pub struct Array(/* private fields */);
Expand description
Subtype of Value
that represents an array
Implementations§
Trait Implementations§
source§impl ArithmeticOperationExt for Array
impl ArithmeticOperationExt for Array
source§fn arithmetic_op(
left: &Self,
right: &Self,
operation: ArithmeticOperation
) -> Result<Self, Error>
fn arithmetic_op( left: &Self, right: &Self, operation: ArithmeticOperation ) -> Result<Self, Error>
Perform an arithmetic operation on two values
If the operation is not supported on the given type,
an
Error::UnsupportedOperation
will be returned Read moresource§impl BooleanOperationExt for Array
impl BooleanOperationExt for Array
source§fn boolean_op(
left: &Self,
right: &Self,
operation: BooleanOperation
) -> Result<Value, Error>
fn boolean_op( left: &Self, right: &Self, operation: BooleanOperation ) -> Result<Value, Error>
Perform a boolean operation on two values
If the operation is not supported on the given type,
an
Error::UnsupportedOperation
will be returned Read moresource§impl<'de> Deserialize<'de> for Array
impl<'de> Deserialize<'de> for Array
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Vec<Value>> for Array
impl From<Vec<Value>> for Array
source§fn from(value: ArrayInner) -> Self
fn from(value: ArrayInner) -> Self
Converts to this type from the input type.
source§impl IndexingOperationExt for Array
impl IndexingOperationExt for Array
source§fn get_index(&self, index: &Value) -> Result<&Value, Error>
fn get_index(&self, index: &Value) -> Result<&Value, Error>
Get a value from an index
Returns a reference to the value, or an
Error::Index
if the index is not found Read moresource§fn get_indices(&self, index: &Value) -> Result<Vec<&Value>, Error>
fn get_indices(&self, index: &Value) -> Result<Vec<&Value>, Error>
Get values from one or more indices
Returns a vector of references to the values, or an
Error::Index
if any of the indices are not found Read moresource§fn get_index_mut(&mut self, index: &Value) -> Result<&mut Value, Error>
fn get_index_mut(&mut self, index: &Value) -> Result<&mut Value, Error>
Get a value from an index
Returns a mutable reference to the value, or an
Error::Index
if the index is not found Read moresource§fn get_indices_mut(&mut self, index: &Value) -> Result<Vec<&mut Value>, Error>
fn get_indices_mut(&mut self, index: &Value) -> Result<Vec<&mut Value>, Error>
Get values from one or more indices, mutably
Returns a vector of references to the values, or an
Error::Index
if any of the indices are not found Read moresource§impl Into<Vec<Value>> for Array
impl Into<Vec<Value>> for Array
source§fn into(self) -> ArrayInner
fn into(self) -> ArrayInner
Converts this type into the (usually inferred) input type.
source§impl MatchingOperationExt for Array
impl MatchingOperationExt for Array
source§impl Ord for Array
impl Ord for Array
source§impl PartialEq for Array
impl PartialEq for Array
source§impl PartialOrd for Array
impl PartialOrd for Array
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ValueTrait<Vec<Value>> for Array
impl ValueTrait<Vec<Value>> for Array
source§fn new(inner: ArrayInner) -> Self
fn new(inner: ArrayInner) -> Self
Creates a new value from the given inner value
source§fn inner(&self) -> &ArrayInner
fn inner(&self) -> &ArrayInner
Returns a reference to the inner value
source§fn inner_mut(&mut self) -> &mut ArrayInner
fn inner_mut(&mut self) -> &mut ArrayInner
Returns a mutable reference to the inner value
impl Eq for Array
impl StructuralEq for Array
impl StructuralPartialEq for Array
Auto Trait Implementations§
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnwindSafe for Array
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