Trait value_trait::prelude::ArrayTrait
source · pub trait ArrayTrait {
type Element;
// Required methods
fn get<I>(
&self,
i: I
) -> Option<&<I as SliceIndex<[Self::Element]>>::Output>
where I: SliceIndex<[Self::Element]>;
fn iter<'i>(&'i self) -> Box<dyn Iterator<Item = &Self::Element> + 'i>;
fn len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
A trait for the minimal common functionality of a vale array
Required Associated Types§
Required Methods§
sourcefn get<I>(&self, i: I) -> Option<&<I as SliceIndex<[Self::Element]>>::Output>where
I: SliceIndex<[Self::Element]>,
fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<[Self::Element]>>::Output>where
I: SliceIndex<[Self::Element]>,
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.
Provided Methods§
Object Safety§
This trait is not object safe.