pub struct SequenceBuilder { /* private fields */ }Expand description
Builder for YAML sequences.
Implementations§
Source§impl SequenceBuilder
impl SequenceBuilder
Sourcepub fn item(self, value: impl AsYaml) -> Self
pub fn item(self, value: impl AsYaml) -> Self
Add a value to the sequence. Accepts any type implementing AsYaml:
&str, String, i64, bool, f64, CST nodes, etc.
Sourcepub fn insert_sequence(self, other: SequenceBuilder) -> Self
pub fn insert_sequence(self, other: SequenceBuilder) -> Self
Insert a pre-built SequenceBuilder into this sequence.
Sourcepub fn insert_mapping(self, other: MappingBuilder) -> Self
pub fn insert_mapping(self, other: MappingBuilder) -> Self
Insert a pre-built MappingBuilder into this sequence.
Sourcepub fn build(self) -> YamlBuilder
pub fn build(self) -> YamlBuilder
Build the sequence into a YamlBuilder.
Sourcepub fn build_document(self) -> Document
pub fn build_document(self) -> Document
Build the sequence directly into a Document.
Trait Implementations§
Auto Trait Implementations§
impl !UnwindSafe for SequenceBuilder
impl Freeze for SequenceBuilder
impl RefUnwindSafe for SequenceBuilder
impl Send for SequenceBuilder
impl Sync for SequenceBuilder
impl Unpin for SequenceBuilder
impl UnsafeUnpin for SequenceBuilder
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