diff --git a/Sources/Yams/Anchor.swift b/Sources/Yams/Anchor.swift index 4ed859c0..80962aed 100644 --- a/Sources/Yams/Anchor.swift +++ b/Sources/Yams/Anchor.swift @@ -8,7 +8,8 @@ import Foundation /// A representation of a YAML tag see: https://yaml.org/spec/1.2.2/ -/// Types interested in Encoding and Decoding Anchors should conform to YamlAnchorProviding and YamlAnchorCoding respectively. +/// Types interested in Encoding and Decoding Anchors should +/// conform to YamlAnchorProviding and YamlAnchorCoding respectively. public final class Anchor: RawRepresentable, ExpressibleByStringLiteral, Codable, Hashable { /// A CharacterSet containing only characters which are permitted by the underlying cyaml implementation diff --git a/Sources/Yams/RedundancyAliasingStrategy.swift b/Sources/Yams/RedundancyAliasingStrategy.swift index 5e76056c..caf09327 100644 --- a/Sources/Yams/RedundancyAliasingStrategy.swift +++ b/Sources/Yams/RedundancyAliasingStrategy.swift @@ -7,12 +7,12 @@ // /// An enum indicating the outcome of a `RedundancyAliasingStrategy` -/// if the strategy returns `anchor` the encoder will encode an Anchor -/// if the strategy returns `alias` the encoder will encode an alias to an anchor which should already have been specified. -/// If the strategy returns none the encoder will encode without an anchor or an alias public enum RedundancyAliasingOutcome { + /// encoder will encode an Anchor case anchor(Anchor) + /// encoder will encode an alias to an anchor which should already have been specified. case alias(Anchor) + /// encoder will encode without an anchor or an alias case none } @@ -48,6 +48,7 @@ public class HashableAliasingStrategy: RedundancyAliasingStrategy { let uniqueAliasProvider = UniqueAliasProvider() + /// Initialize a new HashableAliasingStrategy public init() {} public func alias(for encodable: any Encodable) throws -> RedundancyAliasingOutcome { @@ -81,6 +82,7 @@ public class StrictEncodableAliasingStrategy: RedundancyAliasingStrategy { let uniqueAliasProvider = UniqueAliasProvider() + /// Initialize a new StrictEncodableAliasingStrategy public init() {} private let encoder = YAMLEncoder()