pub struct YamlBuilder { /* private fields */ }Expand description
A builder for constructing YAML documents with a fluent API.
Implementations§
Source§impl YamlBuilder
impl YamlBuilder
Sourcepub fn alias(name: impl AsRef<str>) -> Self
pub fn alias(name: impl AsRef<str>) -> Self
Start building from an alias (*name).
name is the anchor name without the * prefix.
§Examples
use yaml_edit::YamlBuilder;
let yaml = YamlBuilder::alias("shared").build();
assert_eq!(yaml.to_string(), "*shared");Sourcepub fn sequence() -> SequenceBuilder
pub fn sequence() -> SequenceBuilder
Start building from a sequence.
Sourcepub fn mapping() -> MappingBuilder
pub fn mapping() -> MappingBuilder
Start building from a mapping.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for YamlBuilder
impl !Send for YamlBuilder
impl !Sync for YamlBuilder
impl !UnwindSafe for YamlBuilder
impl Freeze for YamlBuilder
impl Unpin for YamlBuilder
impl UnsafeUnpin for YamlBuilder
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