pub struct BoxPool<T, const N: usize, B = CriticalSlots<N>> { /* private fields */ }Expand description
Owned-value pool — like heapless::BoxPool.
alloc writes a value into a free slot and returns a
BoxGuard. When the guard is dropped the slot is freed and T’s
destructor runs.
Obtain a &'static BoxPool via StaticBoxPool::init_pool.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize, B = CriticalSlots<N>> !Freeze for BoxPool<T, N, B>
impl<T, const N: usize, B = CriticalSlots<N>> !RefUnwindSafe for BoxPool<T, N, B>
impl<T, const N: usize, B> Send for BoxPool<T, N, B>
impl<T, const N: usize, B> Unpin for BoxPool<T, N, B>
impl<T, const N: usize, B> UnsafeUnpin for BoxPool<T, N, B>where
B: UnsafeUnpin,
T: UnsafeUnpin,
impl<T, const N: usize, B> UnwindSafe for BoxPool<T, N, B>where
B: UnwindSafe,
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