Crate serde_saphyr

Crate serde_saphyr 

Source

Re-exports§

pub use de::Budget;
pub use de::DuplicateKeyPolicy;
pub use de::Options;

Modules§

budget
Streaming YAML budget checker using saphyr-parser.
options
ser_error

Structs§

ArcAnchor
Serialization public API is defined at crate root A wrapper around Arc<T> that opt-ins a field for anchor emission (e.g. serialization by reference).
ArcWeakAnchor
Serialization public API is defined at crate root A wrapper around [Weak<T>] (from std::sync) that opt-ins for anchor emission.
Commented
Attach an inline YAML comment to a value when serializing.
FlowMap
Force a mapping to be emitted in flow style: {k1: v1, k2: v2}.
FlowSeq
Force a sequence to be emitted in flow style: [a, b, c].
FoldStr
Force a YAML folded block string using the > style.
LitStr
Force a YAML block literal string using the | style.
Location
Row/column location within the source YAML document (1-indexed).
RcAnchor
Serialization public API is defined at crate root A wrapper around Rc<T> that opt-ins a field for anchor emission (e.g. serialization by reference).
RcWeakAnchor
Serialization public API is defined at crate root A wrapper around [Weak<T>] (from std::rc) that opt-ins for anchor emission.
SerializerOptions

Enums§

Error
Error type compatible with serde::de::Error.

Functions§

from_multiple
Deserialize multiple YAML documents from a single string into a vector of T. Completely empty documents are ignored and not included into returned vector.
from_multiple_with_options
Deserialize multiple YAML documents into a vector with configurable Options.
from_reader
Deserialize a single YAML document from any std::io::Read.
from_reader_with_options
Deserialize a single YAML document from any std::io::Read with configurable Options.
from_slice
Deserialize a single YAML document from a UTF-8 byte slice.
from_slice_multiple
Deserialize multiple YAML documents from a UTF-8 byte slice into a vector of T.
from_slice_multiple_with_options
Deserialize multiple YAML documents from bytes with configurable Options. Completely empty documents are ignored and not included into returned vector.
from_slice_with_options
Deserialize a single YAML document from a UTF-8 byte slice with configurable Options.
from_str
Deserialize any T: serde::de::DeserializeOwned directly from a YAML string.
from_str_with_options
Deserialize a single YAML document with configurable Options.
read
Create an iterator over YAML documents from any std::io::Read using default options.
read_with_options
Create an iterator over YAML documents from any std::io::Read, with configurable options.
to_fmt_writer
Serialize a value as YAML into any [fmt::Write] target.
to_fmt_writer_with_options
Serialize a value as YAML into any [fmt::Write] target, with options. Options are consumed because anchor generator may be taken from them.
to_io_writer
Serialize a value as YAML into any [io::Write] target.
to_io_writer_with_options
Serialize a value as YAML into any [io::Write] target, with options. Options are consumed because anchor generator may be taken from them.
to_string
Serialize a value to a YAML String.
to_string_multiple
Serialize multiple documents into a YAML string.
to_writerDeprecated
Deprecated: use to_fmt_writer or to_io_writer Kept for a transition release to avoid instant breakage.
to_writer_with_optionsDeprecated
Deprecated: use to_fmt_writer_with_options for fmt::Write or to_io_writer_with_options for io::Write.