[][src]Struct toml_edit::ArrayOfTables

pub struct ArrayOfTables { /* fields omitted */ }

Type representing a TOML array of tables

Implementations

impl ArrayOfTables[src]

pub fn new() -> Self[src]

Creates an empty array of tables.

pub fn iter(&self) -> Box<dyn Iterator<Item = &'a Table> + 'a>[src]

Returns an iterator over tables.

pub fn get(&self, index: usize) -> Option<&Table>[src]

Returns an optional reference to the table.

pub fn get_mut(&mut self, index: usize) -> Option<&mut Table>[src]

Returns an optional mutable reference to the table.

pub fn append(&mut self, table: Table) -> &mut Table[src]

Appends a table to the array.

pub fn remove(&mut self, index: usize)[src]

Removes a table with the given index.

pub fn clear(&mut self)[src]

Removes all the tables.

pub fn len(&self) -> usize[src]

Returns the length of the underlying Vec. To get the actual number of items use a.iter().count().

pub fn is_empty(&self) -> bool[src]

Returns true iff self.len() == 0.

Trait Implementations

impl Clone for ArrayOfTables[src]

impl Debug for ArrayOfTables[src]

impl Default for ArrayOfTables[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.