Trait simd_json::prelude::Array [−][src]
pub trait Array: Index<usize> + Sync + Send + Clone { type Element: Value; #[must_use] pub fn get<I>(
&self,
i: I
) -> Option<&<I as SliceIndex<[Self::Element]>>::Output>
where
I: SliceIndex<[Self::Element]>; #[must_use] pub fn get_mut(&mut self, i: usize) -> Option<&mut Self::Element>; #[must_use] pub fn pop(&mut self) -> Option<Self::Element>; pub fn push(&mut self, e: Self::Element); #[must_use] pub fn iter(
&'i self
) -> Box<dyn Iterator<Item = &'i Self::Element> + 'i, Global>; #[must_use] pub fn len(&self) -> usize; #[must_use] pub fn is_empty(&self) -> bool { ... } }
Prelude to include needed traits Functions guaranteed for any array object
Associated Types
Loading content...Required methods
#[must_use]pub fn get<I>(
&self,
i: I
) -> Option<&<I as SliceIndex<[Self::Element]>>::Output> where
I: SliceIndex<[Self::Element]>,
[src]
#[must_use]
pub 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.
#[must_use]pub fn get_mut(&mut self, i: usize) -> Option<&mut Self::Element>
[src]
#[must_use]
pub fn get_mut(&mut self, i: usize) -> Option<&mut 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.
#[must_use]pub fn pop(&mut self) -> Option<Self::Element>
[src]
#[must_use]
pub fn pop(&mut self) -> Option<Self::Element>Returns the last element of the array or None
pub fn push(&mut self, e: Self::Element)
[src]
Appends e to the end of the Array
#[must_use]pub fn iter(
&'i self
) -> Box<dyn Iterator<Item = &'i Self::Element> + 'i, Global>
[src]
#[must_use]
pub fn iter(&'i self
) -> Box<dyn Iterator<Item = &'i Self::Element> + 'i, Global>
Iterates over the values paris
#[must_use]pub fn len(&self) -> usize
[src]
#[must_use]
pub fn len(&self) -> usizeNumber of key/value pairs
Provided methods
Loading content...Implementations on Foreign Types
impl<T> Array for Vec<T, Global> where
T: Value + Sync + Send + Clone,
[src]
impl<T> Array for Vec<T, Global> where
T: Value + Sync + Send + Clone,
[src]type Element = T
pub fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<[T]>>::Output> where
I: SliceIndex<[T]>,
[src]
I: SliceIndex<[T]>,