pub struct Arr { /* private fields */ }
Expand description
Arr
struct.
Implementations§
Source§impl Arr
impl Arr
Sourcepub fn from_vec(vec: Vec<Value>) -> Result<Arr, OverError>
pub fn from_vec(vec: Vec<Value>) -> Result<Arr, OverError>
Returns a new Arr
from the given vector of Value
s.
Sourcepub fn from_vec_unchecked(vec: Vec<Value>, inner_t: Type) -> Arr
pub fn from_vec_unchecked(vec: Vec<Value>, inner_t: Type) -> Arr
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
.
Sourcepub fn get(&self, index: usize) -> Result<Value, OverError>
pub fn get(&self, index: usize) -> Result<Value, OverError>
Gets the value at index
.
Returns an error if index
is out of bounds.
Sourcepub fn inner_type(&self) -> Type
pub fn inner_type(&self) -> Type
Returns the type of all elements in this Arr
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Arr
impl RefUnwindSafe for Arr
impl Send for Arr
impl Sync for Arr
impl Unpin for Arr
impl UnwindSafe for Arr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more