pub struct List(/* private fields */);Expand description
A list of Values.
Implementations§
source§impl List
impl List
sourcepub fn get_by_value(&self, index: &Value) -> Result<Value, Fault>
pub fn get_by_value(&self, index: &Value) -> Result<Value, Fault>
Returns the value at index.
§Errors
Returns Fault::OutOfBounds if index cannot be converted to a
usize or is out of bounds of this list.
pub fn get(&self, index: usize) -> Option<Value>
sourcepub fn insert(&self, index: &Value, value: Value) -> Result<(), Fault>
pub fn insert(&self, index: &Value, value: Value) -> Result<(), Fault>
Inserts value at index.
§Errors
Returns Fault::OutOfBounds if index cannot be converted to a
usize or is greater than the length of this list.
Trait Implementations§
source§impl CustomType for List
impl CustomType for List
source§impl FromIterator<Value> for List
impl FromIterator<Value> for List
Auto Trait Implementations§
impl !Freeze for List
impl !RefUnwindSafe for List
impl Send for List
impl Sync for List
impl Unpin for List
impl UnwindSafe for List
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