Struct ohkami_lib::List
source · pub struct List<T, const CAPACITY: usize> { /* private fields */ }Implementations§
source§impl<T, const CAPACITY: usize> List<T, CAPACITY>
impl<T, const CAPACITY: usize> List<T, CAPACITY>
pub const fn new() -> Self
pub unsafe fn get_unchecked(&self, index: usize) -> &T
sourcepub unsafe fn push_unchecked(&mut self, element: T)
pub unsafe fn push_unchecked(&mut self, element: T)
SAFETY: The amount of calling push, push_unchecked for this List before
is LESS THAN CAPACITY
pub fn push(&mut self, element: T)
Trait Implementations§
Auto Trait Implementations§
impl<T, const CAPACITY: usize> Freeze for List<T, CAPACITY>where
T: Freeze,
impl<T, const CAPACITY: usize> RefUnwindSafe for List<T, CAPACITY>where
T: RefUnwindSafe,
impl<T, const CAPACITY: usize> Send for List<T, CAPACITY>where
T: Send,
impl<T, const CAPACITY: usize> Sync for List<T, CAPACITY>where
T: Sync,
impl<T, const CAPACITY: usize> Unpin for List<T, CAPACITY>where
T: Unpin,
impl<T, const CAPACITY: usize> UnwindSafe for List<T, CAPACITY>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