Struct fera_array::VecArray
source · pub struct VecArray<T>(_);
Trait Implementations
sourceimpl<T> Array<T> for VecArray<T>
impl<T> Array<T> for VecArray<T>
sourcefn with_value(value: T, n: usize) -> Selfwhere
Self: Sized,
T: Clone,
fn with_value(value: T, n: usize) -> Selfwhere
Self: Sized,
T: Clone,
Creates a new array with
n
repeated value
.sourcefn get(&self, index: usize) -> Option<&T>
fn get(&self, index: usize) -> Option<&T>
Returns a reference to the element of the array at
index
, or None
if the index is out
of bounds. Read moresourcefn get_mut(&mut self, index: usize) -> Option<&mut T>
fn get_mut(&mut self, index: usize) -> Option<&mut T>
Returns a mutable reference to the element of the array at
index
, or None
if the index
is out of bounds. Read moresourceunsafe fn get_unchecked(&self, index: usize) -> &T
unsafe fn get_unchecked(&self, index: usize) -> &T
Returns a reference to the element of the array at
index
, without doing bounds checking.sourceunsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T
unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T
Returns a mutable reference to the element of the array at
index
, without doing bounds
checking. Read moresourceimpl<T> DynamicArray<T> for VecArray<T>
impl<T> DynamicArray<T> for VecArray<T>
sourcefn with_capacity(capacity: usize) -> Selfwhere
Self: Sized,
fn with_capacity(capacity: usize) -> Selfwhere
Self: Sized,
Creates a array with the specified capacity. Read more
sourcefn reserve(&mut self, additional: usize)
fn reserve(&mut self, additional: usize)
Reserve capacity for at least
additional
more elements. Read moresourcefn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
Appends all elements of
iter
to the array. Read moresourcefn extend_from_slice(&mut self, other: &[T])where
T: Clone,
fn extend_from_slice(&mut self, other: &[T])where
T: Clone,
Appends all elements in a slice to the array. Read more
sourceunsafe fn push_unchecked(&mut self, value: T)
unsafe fn push_unchecked(&mut self, value: T)
Write value to the end of the array and increment the length. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for VecArray<T>where
T: RefUnwindSafe,
impl<T> Send for VecArray<T>where
T: Send,
impl<T> Sync for VecArray<T>where
T: Sync,
impl<T> Unpin for VecArray<T>where
T: Unpin,
impl<T> UnwindSafe for VecArray<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more