[][src]Struct over::arr::Arr

pub struct Arr { /* fields omitted */ }

Arr struct.

Methods

impl Arr[src]

pub fn from_vec(vec: Vec<Value>) -> OverResult<Arr>[src]

Returns a new Arr from the given vector of Values.

pub fn from_vec_unchecked(vec: Vec<Value>, inner_t: Type) -> Arr[src]

Returns a new Arr from the given vector of Values without checking whether every value in vec is the same type.

It is much faster than the safe version, [from_vec], if you know every element in vec is of type inner_t.

pub fn vec_ref(&self) -> &Vec<Value>[src]

Returns a reference to the inner vec of this Arr.

pub fn with_each<F>(&self, f: F) where
    F: FnMut(&Value), 
[src]

Iterates over each Value in self, applying Fn f.

pub fn get(&self, index: usize) -> OverResult<Value>[src]

Gets the value at index. Returns an error if index is out of bounds.

pub fn inner_type(&self) -> Type[src]

Returns the type of all elements in this Arr.

pub fn len(&self) -> usize[src]

Returns the length of this Arr.

pub fn is_empty(&self) -> bool[src]

Returns whether this Arr is empty.

pub fn ptr_eq(&self, other: &Self) -> bool[src]

Returns whether self and other point to the same data.

pub fn iter(&self) -> Iter<Value>[src]

Returns an iterator over the Arr.

Trait Implementations

impl PartialEq<Arr> for Arr[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<Arr> for Value[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<Value> for Arr[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for Arr[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<Arr> for Value[src]

impl Default for Arr[src]

impl Display for Arr[src]

impl Debug for Arr[src]

Auto Trait Implementations

impl Send for Arr

impl Sync for Arr

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.