Skip to main content

Crate yaml_rt_serde

Crate yaml_rt_serde 

Source
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::Write sink.

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.