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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl Display for ArrayOfTables
Available on crate feature display
only.
impl Display for ArrayOfTables
display
only.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)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes