pub struct SizedPool<T: Default> { /* private fields */ }Expand description
A pool allocator that allocates fixed-size blocks.
Implementations§
Source§impl<T: Default> SizedPool<T>
impl<T: Default> SizedPool<T>
Sourcepub unsafe fn add_range(&mut self, range: Range<usize>)
pub unsafe fn add_range(&mut self, range: Range<usize>)
Add a range of blocks to the pool.
range - The range of blocks to add.
§Safety
The caller must ensure that the range is valid and that the blocks are at least the size of T + SizedPoolMeta + Padding for T.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SizedPool<T>
impl<T> RefUnwindSafe for SizedPool<T>where
T: RefUnwindSafe,
impl<T> Send for SizedPool<T>where
T: Send,
impl<T> Sync for SizedPool<T>where
T: Sync,
impl<T> Unpin for SizedPool<T>where
T: Unpin,
impl<T> UnwindSafe for SizedPool<T>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