[−][src]Struct toml_edit::Array
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]
impl Debug for Array
[src]
impl Default for Array
[src]
impl Display for Array
[src]
impl From<Array> for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnwindSafe for Array
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,