pub struct Array<T> { /* private fields */ }Expand description
Array type with index operations
Implementations§
Source§impl<T> Array<T>
impl<T> Array<T>
pub fn new() -> Self
pub fn push(&mut self, item: T)
pub fn pop(&mut self) -> Option<T>
pub fn insert(&mut self, index: usize, item: T)
pub fn remove(&mut self, index: usize) -> T
pub fn get(&self, index: usize) -> Option<&T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = &T>
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Array<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Array<T>where
T: Deserialize<'de>,
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
Auto Trait Implementations§
impl<T> Freeze for Array<T>
impl<T> RefUnwindSafe for Array<T>where
T: RefUnwindSafe,
impl<T> Send for Array<T>where
T: Send,
impl<T> Sync for Array<T>where
T: Sync,
impl<T> Unpin for Array<T>where
T: Unpin,
impl<T> UnwindSafe for Array<T>where
T: UnwindSafe,
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