Struct toml_edit::ArrayOfTables
source · pub struct ArrayOfTables { /* private fields */ }
Expand description
Type representing a TOML array of tables
Implementations§
source§impl ArrayOfTables
impl ArrayOfTables
Constructors
See also FromIterator
source§impl ArrayOfTables
impl ArrayOfTables
Formatting
sourcepub fn into_array(self) -> Array
pub fn into_array(self) -> Array
Convert to an inline array
source§impl ArrayOfTables
impl ArrayOfTables
sourcepub fn iter(&self) -> ArrayOfTablesIter<'_>
pub fn iter(&self) -> ArrayOfTablesIter<'_>
Returns an iterator over tables.
sourcepub fn iter_mut(&mut self) -> ArrayOfTablesIterMut<'_>
pub fn iter_mut(&mut self) -> ArrayOfTablesIterMut<'_>
Returns an iterator over tables.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the length of the underlying Vec.
To get the actual number of items use a.iter().count()
.
sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut Table>
pub fn get_mut(&mut self, index: usize) -> Option<&mut Table>
Returns an optional mutable reference to the table.
sourcepub fn retain<F>(&mut self, keep: F)
pub fn retain<F>(&mut self, keep: F)
Retains only the elements specified by the keep
predicate.
In other words, remove all tables for which keep(&table)
returns false
.
This method operates in place, visiting each element exactly once in the original order, and preserves the order of the retained elements.
Trait Implementations§
source§impl Clone for ArrayOfTables
impl Clone for ArrayOfTables
source§fn clone(&self) -> ArrayOfTables
fn clone(&self) -> ArrayOfTables
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ArrayOfTables
impl Debug for ArrayOfTables
source§impl Default for ArrayOfTables
impl Default for ArrayOfTables
source§fn default() -> ArrayOfTables
fn default() -> ArrayOfTables
Returns the “default value” for a type. Read more
source§impl Display for ArrayOfTables
impl Display for ArrayOfTables
source§impl Extend<Table> for ArrayOfTables
impl Extend<Table> for ArrayOfTables
source§fn extend<T: IntoIterator<Item = Table>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Table>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl FromIterator<Table> for ArrayOfTables
impl FromIterator<Table> for ArrayOfTables
source§impl<'s> IntoIterator for &'s ArrayOfTables
impl<'s> IntoIterator for &'s ArrayOfTables
Auto Trait Implementations§
impl Freeze for ArrayOfTables
impl RefUnwindSafe for ArrayOfTables
impl Send for ArrayOfTables
impl Sync for ArrayOfTables
impl Unpin for ArrayOfTables
impl UnwindSafe for ArrayOfTables
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)