Struct toml_edit::Array [−][src]
pub struct Array { /* fields omitted */ }
Expand description
Type representing a TOML array,
payload of the Value::Array
variant’s value
Implementations
Returns the length of the underlying Vec.
To get the actual number of items use a.iter().count()
.
Appends a new value to the end of the array, applying default formatting to it.
Returns an error if the value was of a different type than the values in the array.
Appends a new, already formatted value to the end of the array.
Returns an error if the value was of a different type than the array.
Inserts an element at the given position within the array, applying default formatting to it and shifting all values after it to the right.
Returns an error if the value was of a different type than the values in the array.
Panics if index > len
.
Inserts an already formatted value at the given position within the array, shifting all values after it to the right.
Returns an error if the value was of a different type than the values in the array.
Panics if index > len
.
Replaces the element at the given position within the array, preserving existing formatting.
Returns an error if the replacement was of a different type than the values in the array.
Panics if index >= len
.
Replaces the element at the given position within the array with an already formatted value.
Returns an error if the replacement was of a different type than the values in the array.
Panics if index >= len
.
Returns a reference to the value at the given index, or None
if the index is out of
bounds.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Array
impl UnwindSafe for Array
Blanket Implementations
Mutably borrows from an owned value. Read more