pub struct Yamler {
depth: usize,
needs_indent: bool,
}Fields§
§depth: usize§needs_indent: boolImplementations§
Source§impl Yamler
impl Yamler
pub fn new() -> Self
pub fn indent(&mut self) -> Section<'_>
fn newline(&mut self) -> &mut Self
fn increase(&mut self)
fn decrease(&mut self)
fn print_indentation(&mut self, writer: &mut impl Write)
Sourcepub fn key(&mut self, name: impl Yamlify) -> Section<'_>
pub fn key(&mut self, name: impl Yamlify) -> Section<'_>
Prints a section header and increases indentation
Sourcepub fn pair<D: Yamlify, T: Yamlify>(&mut self, name: D, value: T) -> &mut Self
pub fn pair<D: Yamlify, T: Yamlify>(&mut self, name: D, value: T) -> &mut Self
Prints a yaml key value pair: - name: "value"
Sourcepub fn value<D: Yamlify>(&mut self, value: D) -> &mut Self
pub fn value<D: Yamlify>(&mut self, value: D) -> &mut Self
Prints a yaml scalar value: `“name”``
pub fn list<D: Yamlify>(&mut self, list: &[D]) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Yamler
impl RefUnwindSafe for Yamler
impl Send for Yamler
impl Sync for Yamler
impl Unpin for Yamler
impl UnsafeUnpin for Yamler
impl UnwindSafe for Yamler
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