Node
public enum Node : Hashable
extension Node: Comparable
extension Node: ExpressibleByArrayLiteral
extension Node: ExpressibleByDictionaryLiteral
extension Node: ExpressibleByFloatLiteral
extension Node: ExpressibleByIntegerLiteral
extension Node: ExpressibleByStringLiteral
extension Node: NodeRepresentable
YAML Node.
-
Scalar node.
See moreDeclaration
-
A mapping is the YAML equivalent of a
See moreDictionary.Declaration
-
Get or set the
Node.Mappingvalue if this node is aNode.mapping.Declaration
Swift
public var mapping: Mapping? { get set }
-
Scalar node.
See moreDeclaration
-
Get or set the
Node.Scalarvalue if this node is aNode.scalar.Declaration
Swift
public var scalar: Scalar? { get set } -
Get or set the
Node.Aliasvalue if this node is aNode.alias.Declaration
Swift
public var alias: Alias? { get set }
-
Sequence node.
See moreDeclaration
Swift
public struct Sequenceextension Node.Sequence: Comparableextension Node.Sequence: Equatableextension Node.Sequence: Hashableextension Node.Sequence: ExpressibleByArrayLiteralextension Node.Sequence: MutableCollectionextension Node.Sequence: RandomAccessCollectionextension Node.Sequence: RangeReplaceableCollection -
Get or set the
Node.Sequencevalue if this node is aNode.sequence.Declaration
Swift
public var sequence: Sequence? { get set } -
Create a
Node.scalarwith a string, tag & scalar style.Declaration
Parameters
stringString value for this node.
tagTag for this node.
styleStyle to use when emitting this node.
-
Create a
Node.mappingwith a sequence of node pairs, tag & scalar style.Declaration
Parameters
pairsPairs of nodes to use for this node.
tagTag for this node.
styleStyle to use when emitting this node.
-
Create a
Node.sequencewith a sequence of nodes, tag & scalar style.Declaration
Parameters
nodesSequence of nodes to use for this node.
tagTag for this node.
styleStyle to use when emitting this node.
-
The tag for this node.
Note
Accessing this property causes the tag to be resolved by tag.resolver.Declaration
Swift
public var tag: Tag { get } -
The location for this node.
Declaration
Swift
public var mark: Mark? { get } -
The anchor for this node.
Declaration
Swift
public var anchor: Anchor? { get }
-
This node as an
Any, if convertible.Declaration
Swift
public var any: Any { get } -
This node as a
String, if convertible.Declaration
Swift
public var string: String? { get } -
This node as a
Bool, if convertible.Declaration
Swift
public var bool: Bool? { get } -
This node as a
Double, if convertible.Declaration
Swift
public var float: Double? { get } -
This node as an
NSNull, if convertible.Declaration
Swift
public var null: NSNull? { get } -
This node as an
Int, if convertible.Declaration
Swift
public var int: Int? { get } -
This node as a
Data, if convertible.Declaration
Swift
public var binary: Data? { get } -
This node as a
Date, if convertible.Declaration
Swift
public var timestamp: Date? { get } -
This node as a
UUID, if convertible.Declaration
Swift
public var uuid: UUID? { get }
-
Returns this node mapped as an
Array<Node>. If the node isn’t aNode.sequence, the array will be empty.Declaration
Swift
public func array() -> [Node] -
Typed Array using type parameter: e.g.
array(of: String.self).Declaration
Swift
public func array<Type>(of type: Type.Type = Type.self) -> [Type] where Type : ScalarConstructibleParameters
typeType conforming to
ScalarConstructible.Return Value
Array of
Type. -
If the node is a
.sequenceor.mapping, set or get the specified parameter’sNoderepresentation. If the node is a.scalar, this is a no-op.Declaration
Swift
public subscript(representable: NodeRepresentable) -> Node? { get set }
-
Returns true if
lhsis ordered beforerhs.Declaration
Swift
public static func < (lhs: Node, rhs: Node) -> BoolParameters
lhsThe left hand side Node to compare.
rhsThe right hand side Node to compare.
Return Value
True if
lhsis ordered beforerhs.
-
Create a
Node.sequencefrom an array literal ofNodes.Declaration
Swift
public init(arrayLiteral elements: Node...) -
Create a
Node.sequencefrom an array literal ofNodes and a defaultStyleto use for the array literalDeclaration
Swift
public init(arrayLiteral elements: Node..., style: Sequence.Style) -
Create a
Node.mappingfrom a dictionary literal ofNodes.Declaration
Swift
public init(dictionaryLiteral elements: (Node, Node)...) -
Create a
Node.mappingfrom a dictionary literal ofNodes and a defaultStyleto use for the dictionary literal.Declaration
Swift
public init(dictionaryLiteral elements: (Node, Node)..., style: Mapping.Style) -
Create a
Node.scalarfrom a float literal.Declaration
Swift
public init(floatLiteral value: Double) -
Create a
Node.scalarfrom an integer literal.Declaration
Swift
public init(integerLiteral value: Int) -
Create a
Node.scalarfrom a string literal.Declaration
Swift
public init(stringLiteral value: String) -
Initialize a
Nodewith a value ofNodeRepresentable.Throws
Declaration
Swift
init<T>(_ representable: T) throws where T : NodeRepresentableParameters
representableValue of
NodeRepresentableto represent as aNode.
-
This value’s
Noderepresentation.Declaration
Swift
public func represented() throws -> Node
View on GitHub
Install in Dash