Struct DeArray

pub struct DeArray<'i> { /* private fields */ }

Type representing a TOML array, payload of the DeValue::Array variant

Implementations

impl<'i> DeArray<'i>

const fn new() -> Self

Constructs a new, empty DeArray.

This will not allocate until elements are pushed onto it.

fn push(&mut self, value: Spanned<DeValue<'i>>)

Appends an element to the back of a collection.

Panics

Panics if the new capacity exceeds isize::MAX bytes.

Trait Implementations

impl Debug for DeArray<'_>

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

impl Default for DeArray<'static>

fn default() -> Self

impl<'i> AsMut<[Spanned<DeValue<'i>>]> for DeArray<'i>

fn as_mut(&mut self) -> &mut [Spanned<DeValue<'i>>]

impl<'i> AsRef<[Spanned<DeValue<'i>>]> for DeArray<'i>

fn as_ref(&self) -> &[Spanned<DeValue<'i>>]

impl<'i> Borrow<[Spanned<DeValue<'i>>]> for DeArray<'i>

fn borrow(&self) -> &[Spanned<DeValue<'i>>]

impl<'i> BorrowMut<[Spanned<DeValue<'i>>]> for DeArray<'i>

fn borrow_mut(&mut self) -> &mut [Spanned<DeValue<'i>>]

impl<'i> Clone for DeArray<'i>

fn clone(&self) -> DeArray<'i>

impl<'i> Deref for DeArray<'i>

type Target = [Spanned<DeValue<'i>>];
fn deref(&self) -> &[Spanned<DeValue<'i>>]

impl<'i> DerefMut for DeArray<'i>

fn deref_mut(&mut self) -> &mut [Spanned<DeValue<'i>>]

impl<'i> FromIterator<Spanned<DeValue<'i>>> for DeArray<'i>

fn from_iter<I: IntoIterator<Item = Spanned<DeValue<'i>>>>(iter: I) -> Self

impl<'i> IntoIterator for DeArray<'i>

type Item = Spanned<DeValue<'i>>;
type IntoIter = IntoIter<Spanned<DeValue<'i>>>;
fn into_iter(self) -> Self::IntoIter

impl<'i, I: SliceIndex<[Spanned<DeValue<'i>>]>> Index<I> for DeArray<'i>

type Output = <I as SliceIndex<[Spanned<DeValue<'i>>]>>::Output;
fn index(&self, index: I) -> &Self::Output

Auto Trait Implementations

impl<'i> Freeze for DeArray<'i>

impl<'i> RefUnwindSafe for DeArray<'i>

impl<'i> Send for DeArray<'i>

impl<'i> Sync for DeArray<'i>

impl<'i> Unpin for DeArray<'i>

impl<'i> UnsafeUnpin for DeArray<'i>

impl<'i> UnwindSafe for DeArray<'i>

Blanket Implementations

impl<P, T> Receiver for DeArray<'i> where P: Deref<Target = T> + ?Sized, T: ?Sized,

type Target = T;

impl<T> Any for DeArray<'i> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for DeArray<'i> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for DeArray<'i> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for DeArray<'i> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for DeArray<'i>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for DeArray<'i> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for DeArray<'i> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for DeArray<'i> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for DeArray<'i> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>