pub enum Node {
Mapping(Vec<(Node, Node)>),
Sequence(Vec<Node>),
String(String),
Null,
Boolean(bool),
Integer(i64),
FloatingPoint(String),
}Expand description
A YAML schema is a combination of a set of tags and a mechanism for resolving non-specific tags.
The tags are specified in different schemas. The spec defined three main schemas: Failsafe, JSON, and Core. The tags are grouped in the following way:
- Failsafe Schema:
- Mapping
- Sequence
- String
- JSON Schema:
- Null
- Boolean
- Integer
- Floating Point
§Note
The YAML specification defines nodes and tags a two separate (but related) concepts. Because Rust allows us to combine enums with structured data, this crate decides to combine both these concepts into one.
Variants§
Mapping(Vec<(Node, Node)>)
Represents an associative container, where each key is unique in the association and mapped to exactly one value.
Sequence(Vec<Node>)
Represents a collection indexed by sequential integers starting with zero.
String(String)
Represents a Unicode string, a sequence of zero or more Unicode characters.
Null
Represents the lack of a value.
Boolean(bool)
Represents a true/false value.
Integer(i64)
Represents arbitrary sized finite mathematical integers.
FloatingPoint(String)
Represents an approximation to real numbers.