Boolean

public struct Boolean
  • Encodes a boolean value to an RSTaggedData with a tag of WellKnownTags.boolean

    Declaration

    Swift

    public static func encode(_ value: Bool) -> RSTaggedData?

    Parameters

    value

    the value to encode

    Return Value

    An RSTaggedData object with the encoded data or nil if an error is encountered in the encoding process

  • Decode an RSTaggedData tagged with WellKnownTags.boolean to a Bool

    Declaration

    Swift

    public static func decode(_ value: RSTaggedData) -> Bool?

    Parameters

    value

    RSTaggedData contianing data tagged with WellKnownTags.boolean

    Return Value

    The decoded Bool or nil if an error is encountered in the decoding process