pub struct Siblings<'a>(&'a mut Item);Expand description
A container that gains a new key, which should look like its siblings.
Tuple Fields§
§0: &'a mut ItemImplementations§
Source§impl<'a> Siblings<'a>
impl<'a> Siblings<'a>
Sourcepub const fn of(container: &'a mut Item) -> Self
pub const fn of(container: &'a mut Item) -> Self
Treat container as the table that gains a key.
Sourcepub fn append(self, key: &str, node: Item)
pub fn append(self, key: &str, node: Item)
Append node under key, in the spacing of the existing entries.
fn append_to_table(table: &mut Table, key: &str, node: Item)
Sourcefn indent_of(table: &Table) -> Option<String>
fn indent_of(table: &Table) -> Option<String>
The spacing before the last plain key of table, after its last line
break.
Sourcefn take_suffix(value: &mut TomlValue) -> Option<RawString>
fn take_suffix(value: &mut TomlValue) -> Option<RawString>
Remove and return the whitespace after a value, which sits before a comma once another entry follows.
fn value_of(node: Item, suffix: Option<RawString>) -> Item
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for Siblings<'a>
impl<'a> Freeze for Siblings<'a>
impl<'a> RefUnwindSafe for Siblings<'a>
impl<'a> Send for Siblings<'a>
impl<'a> Sync for Siblings<'a>
impl<'a> Unpin for Siblings<'a>
impl<'a> UnsafeUnpin for Siblings<'a>
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