Protocols

The following protocols are available globally.

ScalarConstructible

SexagesimalConvertible

  • Confirming types are convertible to base 60 numeric values.

    See more

    Declaration

    Swift

    public protocol SexagesimalConvertible : ExpressibleByIntegerLiteral
  • A class-bound protocol which implements a strategy for detecting aliasable values in a YAML document. Implementations should return RedundancyAliasingOutcome.anchor(…) for the first occurrence of a value. Subsequent occurrences of the same value (where same-ness is defined by the implementation) should return RedundancyAliasingOutcome.alias(…) where the contained Anchor has the same value as the previously returned RedundancyAliasingOutcome.anchor(…). Its the identity of the Anchor values returned that ultimately informs the YAML encoder when to use aliases. N,B. It is essential that implementations release all references to Anchors which are created by this type when releaseAnchorReferences() is called by the Encoder. After this call the implementation will no longer be referenced by the Encoder and will itself be released.

    See more

    Declaration

    Swift

    public protocol RedundancyAliasingStrategy : AnyObject

NodeRepresentable

ScalarRepresentable

ScalarRepresentableCustomizedForCodable

  • Types conforming to this protocol can be encoded by YamlEncoder.

    See more

    Declaration

    Swift

    public protocol YAMLEncodable : Encodable
  • Types that conform to YamlAnchorProviding and Encodable can optionally dictate the name of a yaml anchor when they are encoded with YAMLEncoder

    See more

    Declaration

    Swift

    public protocol YamlAnchorProviding
  • YamlAnchorCoding refines YamlAnchorProviding. Types that conform to YamlAnchorCoding and Decodable can decode yaml anchors from source documents into Anchor values for reference or modification in memory.

    See more

    Declaration

    Swift

    public protocol YamlAnchorCoding : YamlAnchorProviding
  • Types that conform to YamlTagProviding and Encodable can optionally dictate the name of a yaml tag when they are encoded with YAMLEncoder

    See more

    Declaration

    Swift

    public protocol YamlTagProviding
  • YamlTagCoding refines YamlTagProviding. Types that conform to YamlTagCoding and Decodable can decode yaml tags from source documents into Tag values for reference or modification in memory.

    See more

    Declaration

    Swift

    public protocol YamlTagCoding : YamlTagProviding