dyaml.node
Node of a YAML document. Used to read YAML data once it's loaded, and to prepare data to emit.
fn merge
Types 7
enumNodeID : ubyte
scalar
sequence
mapping
invalid
structYAMLNull
Null YAML type. Used in nodes with _null values.
Methods
Invalid YAML type, used internally by SumType
structYAMLMerge
Methods
Constructors
this(K key, V value)Construct a Pair from two values. Will be converted to Nodes if needed.enumNodeType
null_
merge
boolean
integer
decimal
binary
timestamp
string
mapping
sequence
invalid
structNode
YAML node.
This is a pseudo-dynamic type that can store any YAML value, including a sequence or mapping of nodes. You can get data from a Node directly or iterate over it if it's a collection.
Methods
Mark startMark() @property const return scope @safe pure nothrow @nogcReturn the start position of the node.inout(T) get(T, Flag!"stringConversion" stringConversion = Yes.stringConversion)() inout @safe return scopeGet the value of the node as specified type.T get(T)() if (hasIndirections!(Unqual!T) && hasNodeConstructor!(Unqual!T) && (!hasNodeConstructor!(inout(Unqual!T)))) constdittovoid opIndexAssign(K, V)(V value, K index)Set element at specified index in a collection.int opApply(D)(D dg) if (isDelegate!D && (Parameters!D.length == 1))Foreach over a sequence, getting each element as T.int opApply(DG)(DG dg) if (isDelegate!DG && (Parameters!DG.length == 2))Foreach over a mapping, getting each key/value as K/V.void add(T)(T value)Add an element to a sequence.void add(K, V)(K key, V value)Add a key-value pair to a mapping.inout(Node *) opBinaryRight(string op, K)(K key) if (op == "in") inoutDetermine whether a key is in a mapping, and access its value.void remove(T)(T rhs)Remove first (if any) occurence of a value in a collection.void removeAt(T)(T index)Remove element at the specified index of a collection.bool contains_(T, Flag!"key" key, string func)(T rhs) constCheck at compile time if a type is stored nativelyvoid setValue(T)(T value) @trustedConstructors
this(T value, const string tag = null)Construct a Node from a value.this(K[] keys, V[] values, const string tag = null)Construct a node from arrays of keys and values.Nested Templates
sequence(T = Node)Return a range object iterating over a sequence, getting each element as T.mapping()Return a range object iterating over mapping's pairs.Templates 2
tmplhasSimpleNodeConstructor(T)
tmplhasExpandedNodeConstructor(T)