Expand description
A comprehensive YAML 1.2 parser/emitter supporting anchors, aliases, block & flow sequences/mappings, block scalars, tags, multi-doc streams, etc.
§Example
let docs = yyaml::YamlLoader::load_from_str("foo: 123").unwrap();
let doc = &docs[0];
assert_eq!(doc["foo"].as_i64().unwrap(), 123);Re-exports§
pub use events::Event;pub use events::EventReceiver;pub use events::MarkedEventReceiver;pub use events::TEncoding;pub use events::TScalarStyle;pub use events::TokenType;pub use parser::Encoding;pub use parser::YamlLoader;pub use value::Deserializer;pub use value::Mapping;pub use value::Number;pub use value::Sequence;pub use value::Value;pub use value::from_value;
Modules§
- events
- lexer
- Comprehensive lexical analysis module for YAML 1.2 tokenization
- parser
- YAML parser with state machine architecture
- scanner
- Zero-allocation YAML scanner with blazing-fast tokenization
- semantic
- Comprehensive semantic analysis and processing for YAML documents
- value
- Serde-compatible Value type for YAML manipulation
Macros§
- semantic_
error - Macro for creating semantic errors with position context
Structs§
- Linked
Hash Map - Maintains insertion order plus unique keys, like
linked_hash_map. Here we inline a minimal version for demonstration. - MapSerializer
- Marker
- The scanning position for error reporting.
- Struct
Variant Serializer - Tuple
Variant Serializer - VecSerializer
- Yaml
Emitter - An Emitter for Yaml => String, with anchors etc.
- Yaml
Serializer
Enums§
- Emit
Error - Error
- Scan
Error - The parse error used by the scanner/parser if something goes wrong.
- Yaml
- The YAML node representation, mirroring the original design:
Functions§
- from_
str - Deserialize an instance of type T from a string of YAML text.
- parse_
str - Legacy compatibility function - calls the standard from_str implementation
- to_
string - to_
value