pub struct Array<Type, const N: usize> { /* private fields */ }Implementations§
Source§impl<Type, const N: usize> Array<Type, N>
impl<Type, const N: usize> Array<Type, N>
pub const fn capacity(&self) -> usize
pub const fn is_empty(&self) -> bool
pub const fn new() -> Self
pub const fn len(&self) -> usize
pub const fn push(&mut self, value: Type)
pub const fn pop(&mut self) -> Option<Type>
pub fn clear(&mut self)
pub const fn get<'valid>(&'valid self, index: usize) -> Option<&'valid Type>
pub const fn get_mut<'valid>( &'valid mut self, index: usize, ) -> Option<&'valid mut Type>
pub const fn insert(&mut self, index: usize, value: Type)
pub const fn remove(&mut self, index: usize) -> Type
pub const fn iter<'valid>(&'valid self) -> Iter<'valid, Type>
pub const fn iter_mut<'valid>(&'valid mut self) -> IterMut<'valid, Type>
Trait Implementations§
Source§impl<Type, const N: usize> BorrowMut<[Type]> for Array<Type, N>
impl<Type, const N: usize> BorrowMut<[Type]> for Array<Type, N>
Source§fn borrow_mut(&mut self) -> &mut [Type]
fn borrow_mut(&mut self) -> &mut [Type]
Mutably borrows from an owned value. Read more
impl<Type: Eq, const N: usize> Eq for Array<Type, N>
Source§impl<Type, const N: usize> Extend<Type> for Array<Type, N>
impl<Type, const N: usize> Extend<Type> for Array<Type, N>
Source§fn extend<T: IntoIterator<Item = Type>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Type>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<Type, const N: usize> FromIterator<Type> for Array<Type, N>
impl<Type, const N: usize> FromIterator<Type> for Array<Type, N>
Source§fn from_iter<T: IntoIterator<Item = Type>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Type>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<Type, const N: usize> IntoIterator for Array<Type, N>
impl<Type, const N: usize> IntoIterator for Array<Type, N>
Source§impl<'valid, Type, const N: usize> IntoIterator for &'valid Array<Type, N>
impl<'valid, Type, const N: usize> IntoIterator for &'valid Array<Type, N>
Source§impl<'valid, Type, const N: usize> IntoIterator for &'valid mut Array<Type, N>
impl<'valid, Type, const N: usize> IntoIterator for &'valid mut Array<Type, N>
Source§impl<Type: Ord, const N: usize> Ord for Array<Type, N>
impl<Type: Ord, const N: usize> Ord for Array<Type, N>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Type: PartialOrd, const N: usize> PartialOrd for Array<Type, N>
impl<Type: PartialOrd, const N: usize> PartialOrd for Array<Type, N>
Auto Trait Implementations§
impl<Type, const N: usize> Freeze for Array<Type, N>where
Type: Freeze,
impl<Type, const N: usize> RefUnwindSafe for Array<Type, N>where
Type: RefUnwindSafe,
impl<Type, const N: usize> Send for Array<Type, N>where
Type: Send,
impl<Type, const N: usize> Sync for Array<Type, N>where
Type: Sync,
impl<Type, const N: usize> Unpin for Array<Type, N>where
Type: Unpin,
impl<Type, const N: usize> UnsafeUnpin for Array<Type, N>where
Type: UnsafeUnpin,
impl<Type, const N: usize> UnwindSafe for Array<Type, N>where
Type: 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