pub trait FromYamlDoc: Sized {
// Required method
fn from_yaml_doc(doc: &YamlDoc) -> Result<Self, YamlError>;
}Expand description
Converts a YAML document into a typed overlay.
Required Methods§
Sourcefn from_yaml_doc(doc: &YamlDoc) -> Result<Self, YamlError>
fn from_yaml_doc(doc: &YamlDoc) -> Result<Self, YamlError>
Reads Self from doc while preserving the document as the source of
truth for future edits.
§Errors
Returns an error when the implementing overlay cannot be read from the document or when required YAML paths, node kinds, or scalar values are invalid for that overlay.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".