[][src]Struct toml_edit::Array

pub struct Array { /* fields omitted */ }

Type representing a TOML array, payload of the Value::Array variant's value

Methods

impl Array[src]

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]

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

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

Returns an iterator over all values.

pub fn push<V: Into<Value>>(&mut self, v: V) -> bool[src]

Appends a new value.

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

Return an optional reference to the value at the given index.

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

Removes the value at the given index.

pub fn fmt(&mut self)[src]

Auto formats the array.

Trait Implementations

impl Clone for Array[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Array[src]

impl From<Array> for Value[src]

impl Debug for Array[src]

impl Display for Array[src]

Auto Trait Implementations

impl Unpin for Array

impl Sync for Array

impl Send for Array

impl UnwindSafe for Array

impl RefUnwindSafe for Array

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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

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

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