pub struct Array(/* private fields */);Expand description
An array of values
Implementations§
Source§impl Array
impl Array
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new array with the given capacity
Sourcepub fn get(&self, index: usize) -> Option<&Value>
pub fn get(&self, index: usize) -> Option<&Value>
Returns a reference to the element at the given index
Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut Value>
pub fn get_mut(&mut self, index: usize) -> Option<&mut Value>
Returns a mutable reference to the element at the given index
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, Value>
pub fn iter_mut(&mut self) -> IterMut<'_, Value>
Returns an iterator that allows modifying each value
Trait Implementations§
Source§impl FromIterator<Value> for Array
impl FromIterator<Value> for Array
Source§impl<'a> IntoIterator for &'a Array
impl<'a> IntoIterator for &'a Array
Source§impl IntoIterator for Array
impl IntoIterator for Array
impl StructuralPartialEq for Array
Auto Trait Implementations§
impl Freeze for Array
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