Expand description
Serde serialization and deserialization for yaml-rt’s YAML 1.2.2 model.
This crate converts typed values. It intentionally does not preserve YAML
presentation details; use yaml-rt’s YamlRt overlay for lossless
document editing.
from_str and from_slice deserialize one YAML document. from_reader
accepts any byte reader. to_string and to_writer emit deterministic
block-style YAML.
Value provides a yaml_serde-compatible generic YAML model. to_value
and from_value convert between it and typed Serde values without an
intermediate YAML string.
Re-exports§
pub use value::Index;pub use value::Mapping;pub use value::Number;pub use value::Sequence;pub use value::Value;pub use value::from_value;pub use value::to_value;
Modules§
- value
- A loosely typed, presentation-independent YAML value model.
Structs§
- Deserializer
- A Serde deserializer over one YAML stream.
- Error
- Error produced while parsing, deserializing, serializing, or writing YAML.
- Location
- Location of a deserialization error in the YAML input.
- Serializer
- A YAML serializer writing one or more documents to an
io::Writesink.
Functions§
- from_
reader - Deserializes exactly one owned YAML document from a reader.
- from_
reader_ with_ limits - Deserializes one YAML document from a reader with explicit resource limits.
- from_
slice - Deserializes exactly one YAML document from a byte slice.
- from_
slice_ with_ limits - Deserializes one YAML document from bytes with explicit resource limits.
- from_
str - Deserializes exactly one YAML document from a string.
- from_
str_ with_ limits - Deserializes one YAML document from a string with explicit resource limits.
- to_
string - Serializes a value to a UTF-8 YAML string.
- to_
writer - Serializes a value as one YAML document.
Type Aliases§
- Result
- Result type used by this crate.