[][src]Trait simd_json::value::Array

pub trait Array {
    type Element: Value;
#[must_use]
    fn get(&self, i: usize) -> Option<&Self::Element>;
#[must_use] fn get_mut(&mut self, i: usize) -> Option<&mut Self::Element>;
#[must_use] fn pop(&mut self) -> Option<Self::Element>;
fn push(&mut self, e: Self::Element); }

Functions guaranteed for any array object

Associated Types

type Element: Value

Elements of the array

Loading content...

Required methods

#[must_use] fn get(&self, i: usize) -> Option<&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] 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] fn pop(&mut self) -> Option<Self::Element>

Returns the last element of the array or None

fn push(&mut self, e: Self::Element)

Appends e to the end of the Array

Loading content...

Implementations on Foreign Types

impl<T> Array for Vec<T> where
    T: Value
[src]

type Element = T

Loading content...

Implementors

Loading content...