[−][src]Struct over::arr::Arr
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 Value
s.
pub fn from_vec_unchecked(vec: Vec<Value>, inner_t: Type) -> Arr
[src]
Returns a new Arr
from the given vector of Value
s 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]
F: FnMut(&Value),
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]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Arr> for Value
[src]
fn eq(&self, other: &Arr) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Value> for Arr
[src]
fn eq(&self, other: &Value) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for Arr
[src]
fn clone(&self) -> 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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,