pub struct Yaml {
config: YamlConfig,
}Expand description
Main YAML processing interface
Fields§
§config: YamlConfigImplementations§
Source§impl Yaml
impl Yaml
Sourcepub fn with_loader(loader_type: LoaderType) -> Self
pub fn with_loader(loader_type: LoaderType) -> Self
Create a new YAML processor with the specified loader type
Sourcepub const fn with_config(config: YamlConfig) -> Self
pub const fn with_config(config: YamlConfig) -> Self
Create a new YAML processor with custom configuration
Sourcepub const fn config(&self) -> &YamlConfig
pub const fn config(&self) -> &YamlConfig
Get the current configuration
Sourcepub const fn config_mut(&mut self) -> &mut YamlConfig
pub const fn config_mut(&mut self) -> &mut YamlConfig
Get a mutable reference to the configuration
Sourcepub fn load_all_str(&self, input: &str) -> Result<Vec<Value>>
pub fn load_all_str(&self, input: &str) -> Result<Vec<Value>>
Load all YAML documents from a string
Sourcepub fn load_all<R: Read>(&self, reader: R) -> Result<Vec<Value>>
pub fn load_all<R: Read>(&self, reader: R) -> Result<Vec<Value>>
Load all YAML documents from a reader
Sourcepub fn dump<W: Write>(&self, value: &Value, writer: W) -> Result<()>
pub fn dump<W: Write>(&self, value: &Value, writer: W) -> Result<()>
Dump a YAML value to a writer
Sourcepub fn dump_all_str(&self, values: &[Value]) -> Result<String>
pub fn dump_all_str(&self, values: &[Value]) -> Result<String>
Dump all YAML documents to a string
Sourcepub fn dump_all<W: Write>(&self, values: &[Value], writer: W) -> Result<()>
pub fn dump_all<W: Write>(&self, values: &[Value], writer: W) -> Result<()>
Dump all YAML documents to a writer
fn parse_yaml_string(&self, input: &str) -> Result<Value>
fn parse_yaml_documents(&self, input: &str) -> Result<Vec<Value>>
fn emit_yaml_value<W: Write>(&self, value: &Value, writer: W) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Yaml
impl RefUnwindSafe for Yaml
impl Send for Yaml
impl Sync for Yaml
impl Unpin for Yaml
impl UnwindSafe for Yaml
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more