Struct ArrayOfTables
pub struct ArrayOfTables { /* private fields */ }
Available on crate feature
dep_toml_edit
only.Expand description
Type representing a TOML array of tables
Implementations§
§impl ArrayOfTables
Constructors
impl ArrayOfTables
Constructors
See also FromIterator
pub fn new() -> ArrayOfTables
pub fn new() -> ArrayOfTables
Creates an empty array of tables.
§impl ArrayOfTables
Formatting
impl ArrayOfTables
Formatting
pub fn into_array(self) -> Array
pub fn into_array(self) -> Array
Convert to an inline array
§impl ArrayOfTables
impl ArrayOfTables
pub fn iter_mut(&mut self) -> Box<dyn Iterator<Item = &mut Table> + '_>
pub fn iter_mut(&mut self) -> Box<dyn Iterator<Item = &mut Table> + '_>
Returns an iterator over tables.
pub 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()
.
pub fn clear(&mut self)
pub fn clear(&mut self)
Removes all the tables.
pub 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.
pub 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§
§impl Clone for ArrayOfTables
impl Clone for ArrayOfTables
§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 more§impl Debug for ArrayOfTables
impl Debug for ArrayOfTables
§impl Default for ArrayOfTables
impl Default for ArrayOfTables
§fn default() -> ArrayOfTables
fn default() -> ArrayOfTables
Returns the “default value” for a type. Read more
§impl Display for ArrayOfTables
impl Display for ArrayOfTables
§impl Extend<Table> for ArrayOfTables
impl Extend<Table> for ArrayOfTables
§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Table>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Table>,
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
§impl From<ArrayOfTables> for Item
impl From<ArrayOfTables> for Item
§fn from(s: ArrayOfTables) -> Item
fn from(s: ArrayOfTables) -> Item
Converts to this type from the input type.
§impl FromIterator<Table> for ArrayOfTables
impl FromIterator<Table> for ArrayOfTables
§fn from_iter<I>(iter: I) -> ArrayOfTableswhere
I: IntoIterator<Item = Table>,
fn from_iter<I>(iter: I) -> ArrayOfTableswhere
I: IntoIterator<Item = Table>,
Creates a value from an iterator. Read more
§impl<'s> IntoIterator for &'s ArrayOfTables
impl<'s> IntoIterator for &'s ArrayOfTables
§impl IntoIterator for ArrayOfTables
impl IntoIterator for 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> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
The alignment of this type in bytes.
Source§fn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Returns the alignment of this type in bytes.
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T, R> Chain<R> for Twhere
T: ?Sized,
impl<T, R> Chain<R> for Twhere
T: ?Sized,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ExtAny for T
impl<T> ExtAny for T
Source§fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
Returns a deterministic hash of the
TypeId
of Self
using a custom hasher.Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§impl<T> ExtMem for Twhere
T: ?Sized,
impl<T> ExtMem for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Know whether dropping values of this type matters, in compile-time.
Source§fn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Returns the minimum alignment of the type in bytes. Read more
Source§fn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Returns the alignment of the pointed-to value in bytes. Read more
Source§fn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Returns the size of a type in bytes. Read more
Source§fn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Returns the size of the pointed-to value in bytes. Read more
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
Returns
true
if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
Forgets about
self
without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
Available on crate feature
unsafe_layout
only.Returns the value of type
T
represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
Available on crate feature
unsafe_layout
only.Returns the value of type
T
represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
Available on crate feature
unsafe_slice
only.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Hook for T
impl<T> Hook for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more