Trait value_trait::prelude::Array
source · [−]pub trait Array: Index<usize> + Sync + Send + Clone {
type Element: Value;
fn get<I>(
&self,
i: I
) -> Option<&<I as SliceIndex<[Self::Element]>>::Output>
where
I: SliceIndex<[Self::Element]>;
fn get_mut(&mut self, i: usize) -> Option<&mut Self::Element>;
fn pop(&mut self) -> Option<Self::Element>;
fn push(&mut self, e: Self::Element);
fn iter<'i>(&'i self) -> Box<dyn Iterator<Item = &Self::Element> + 'i>;
fn len(&self) -> usize;
fn is_empty(&self) -> bool { ... }
}
Expand description
Functions guaranteed for any array object
Associated Types
Required methods
Gets a ref to a value based on n index, returns None
if the
current Value isn’t an Array or doesn’t contain the index
it was asked for.
Gets a ref to a value based on n index, returns None
if the
current Value isn’t an Array or doesn’t contain the index
it was asked for.
Iterates over the values paris