Struct over::arr::Arr
[−]
[src]
pub struct Arr { /* fields omitted */ }
Arr
struct.
Methods
impl Arr
[src]
fn new() -> Arr
[src]
Returns a new, empty Arr
.
fn from_vec(vec: Vec<Value>) -> OverResult<Arr>
[src]
Returns a new Arr
with the given value vector as elements.
fn get_type(&self) -> Type
[src]
Returns the type of all elements in this Arr
.
fn get(&self, index: usize) -> OverResult<Value>
[src]
Gets the value at index
.
Returns an error if index
is out of bounds.
fn len(&self) -> usize
[src]
Returns the length of this Arr
.
fn is_empty(&self) -> bool
[src]
Returns whether this Arr
is empty.
fn ptr_eq(&self, other: &Self) -> bool
[src]
Returns whether this Arr
and other
point to the same data.
fn set(&mut self, index: usize, value: Value) -> OverResult<()>
[src]
Sets the value at index
to value
.
Returns an error if index
is out of bounds.
fn push(&mut self, value: Value) -> OverResult<()>
[src]
Adds a Value
to the Arr
.
Returns an error if the new Value
is type-incompatible with the Arr
.
fn insert(&mut self, index: usize, value: Value) -> OverResult<()>
[src]
Inserts a Value
into the Arr
at the given index.
Returns an error if the new Value
is type-incompatible with the Arr
or if the index is out of bounds.
fn remove(&mut self, index: usize) -> OverResult<Value>
[src]
Removes and returns a Value
from the Arr
at the given index.
Sets the Arr type to Empty if the new length is 0, otherwise the type is left unchanged.
Returns an error if the index is out of bounds.
Trait Implementations
impl Clone for Arr
[src]
fn clone(&self) -> Arr
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Arr
[src]
impl Default for Arr
[src]
impl PartialEq for Arr
[src]
fn eq(&self, other: &Self) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.