pub struct StaticArrayBuilder<T: Copy, const N: usize> { /* private fields */ }Expand description
This is very slow so use it only on const fn
Implementations§
Source§impl<T: Copy, const N: usize> StaticArrayBuilder<T, N>
impl<T: Copy, const N: usize> StaticArrayBuilder<T, N>
pub const fn new() -> Self
pub const fn push(&mut self, value: T) -> Option<T>
pub const fn remove(&mut self, index: usize) -> Option<T>
pub const fn pop(&mut self) -> Option<T>
pub const fn len(&self) -> usize
pub const fn get(&self, index: usize) -> Option<&T>
pub const fn set(&mut self, index: usize, value: T) -> Option<T>
pub const fn check_len(&self) -> bool
pub const fn build(self) -> [T; N]
pub const fn build_with_is_check(self, is_full: bool) -> [T; N]
Trait Implementations§
Source§impl<T: Clone + Copy, const N: usize> Clone for StaticArrayBuilder<T, N>
impl<T: Clone + Copy, const N: usize> Clone for StaticArrayBuilder<T, N>
Source§fn clone(&self) -> StaticArrayBuilder<T, N>
fn clone(&self) -> StaticArrayBuilder<T, N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T: Copy + Copy, const N: usize> Copy for StaticArrayBuilder<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for StaticArrayBuilder<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for StaticArrayBuilder<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for StaticArrayBuilder<T, N>where
T: Send,
impl<T, const N: usize> Sync for StaticArrayBuilder<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for StaticArrayBuilder<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for StaticArrayBuilder<T, N>where
T: UnsafeUnpin,
impl<T, const N: usize> UnwindSafe for StaticArrayBuilder<T, N>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