pub struct SmartBuffer<T, const N: usize>where
T: Clone,{ /* private fields */ }
Implementations§
Source§impl<T, const N: usize> SmartBuffer<T, N>where
T: Clone,
impl<T, const N: usize> SmartBuffer<T, N>where
T: Clone,
Sourcepub fn insert_slice(&mut self, slice: &[T])
pub fn insert_slice(&mut self, slice: &[T])
Safely inserts a slice of data, starting at the size.
Sourcepub fn insert_slice_at(&mut self, slice: &[T], index: usize)
pub fn insert_slice_at(&mut self, slice: &[T], index: usize)
Safely inserts a slice of data at an index;
Sourcepub fn insert_arr<const M: usize>(&mut self, arr: &[T; M])
pub fn insert_arr<const M: usize>(&mut self, arr: &[T; M])
Safely inserts an array, starting at the size.
Sourcepub unsafe fn get_unchecked(&self, index: usize) -> &T
pub unsafe fn get_unchecked(&self, index: usize) -> &T
Unsafely get a reference to a value at an index. An index too large will result in a fault
Sourcepub unsafe fn get_mut_unchecked(&mut self, index: usize) -> &mut T
pub unsafe fn get_mut_unchecked(&mut self, index: usize) -> &mut T
Unsafely get a mutable
pub fn as_mut_ptr(self) -> *mut Self
pub fn new(value: T, len: usize) -> Self
Trait Implementations§
Source§impl<'a, T, const N: usize> IntoIterator for &'a SmartBuffer<T, N>where
T: Clone,
impl<'a, T, const N: usize> IntoIterator for &'a SmartBuffer<T, N>where
T: Clone,
Source§impl<'a, T, const N: usize> IntoIterator for &'a mut SmartBuffer<T, N>where
T: Clone,
impl<'a, T, const N: usize> IntoIterator for &'a mut SmartBuffer<T, N>where
T: Clone,
Source§impl<T, const N: usize> IntoIterator for SmartBuffer<T, N>where
T: Clone,
impl<T, const N: usize> IntoIterator for SmartBuffer<T, N>where
T: Clone,
Auto Trait Implementations§
impl<T, const N: usize> Freeze for SmartBuffer<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for SmartBuffer<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> !Send for SmartBuffer<T, N>
impl<T, const N: usize> !Sync for SmartBuffer<T, N>
impl<T, const N: usize> Unpin for SmartBuffer<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for SmartBuffer<T, N>where
T: UnwindSafe + RefUnwindSafe,
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