pub struct YamlFragment { /* private fields */ }Expand description
A parsed YAML value document containing exactly one root node.
Implementations§
Source§impl YamlFragment
impl YamlFragment
Sourcepub fn parse_owned(input: String) -> Result<YamlFragment, FragmentError>
pub fn parse_owned(input: String) -> Result<YamlFragment, FragmentError>
Parses an owned YAML value.
§Errors
Returns an error when the input is invalid YAML, does not contain exactly one rooted document, or contains an alias that escapes the value root.
Sourcepub fn parse(input: &str) -> Result<YamlFragment, FragmentError>
pub fn parse(input: &str) -> Result<YamlFragment, FragmentError>
Parses a borrowed YAML value.
§Errors
Returns an error under the same conditions as Self::parse_owned.
Trait Implementations§
Source§impl Clone for YamlFragment
impl Clone for YamlFragment
Source§fn clone(&self) -> YamlFragment
fn clone(&self) -> YamlFragment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for YamlFragment
impl Debug for YamlFragment
impl Eq for YamlFragment
Source§impl PartialEq for YamlFragment
impl PartialEq for YamlFragment
impl StructuralPartialEq for YamlFragment
Auto Trait Implementations§
impl Freeze for YamlFragment
impl RefUnwindSafe for YamlFragment
impl Send for YamlFragment
impl Sync for YamlFragment
impl Unpin for YamlFragment
impl UnsafeUnpin for YamlFragment
impl UnwindSafe for YamlFragment
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