Skip to main content

Siblings

Struct Siblings 

Source
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 Item

Implementations§

Source§

impl<'a> Siblings<'a>

Source

pub const fn of(container: &'a mut Item) -> Self

Treat container as the table that gains a key.

Source

pub fn append(self, key: &str, node: Item)

Append node under key, in the spacing of the existing entries.

Source

fn append_to_table(table: &mut Table, key: &str, node: Item)

Source

fn indent_of(table: &Table) -> Option<String>

The spacing before the last plain key of table, after its last line break.

Source

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.

Source

fn value_of(node: Item, suffix: Option<RawString>) -> Item

Trait Implementations§

Source§

impl<'a> Debug for Siblings<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.