public extension PureYAML.Validation { /// A tree node a `Validator` can walk. `Validator`'s traversal engine is shared by every layer /// (validation-rules.md, principle 10); each `Traversable` conformance supplies only that layer's /// own traversal shape: "each layer defines only its own document, its rules, and its traversal". protocol Traversable: Validatable { /// Extra values to offer to type-directed checks at this node, beyond the node itself (e.g. a /// mapping's own type, or a mapping's key nodes). A `nil` path component offers at this node's /// own path; a non-nil one offers at that child's path (e.g. a mapping key's location). var extraOffers: [(component: Path.Component?, value: any Validatable)] { get } /// This node's children to recurse into, each paired with the path component that reaches it /// from this node. var children: [(component: Path.Component, value: Self)] { get } } }