pub struct TypedMemoryPool<T> { /* private fields */ }Expand description
Typed memory pool for specific data structures
Implementations§
Source§impl<T: Default> TypedMemoryPool<T>
impl<T: Default> TypedMemoryPool<T>
Sourcepub fn new(config: ZerocopyPoolConfig) -> Arc<Self>
pub fn new(config: ZerocopyPoolConfig) -> Arc<Self>
Create a new typed memory pool
Sourcepub fn allocate_typed(self: &Arc<Self>) -> Option<TypedBufferHandle<T>>
pub fn allocate_typed(self: &Arc<Self>) -> Option<TypedBufferHandle<T>>
Allocate a typed buffer from the pool
Sourcepub fn available_count(&self) -> usize
pub fn available_count(&self) -> usize
Get number of available typed buffers
Auto Trait Implementations§
impl<T> !Freeze for TypedMemoryPool<T>
impl<T> !RefUnwindSafe for TypedMemoryPool<T>
impl<T> Send for TypedMemoryPool<T>where
T: Send,
impl<T> Sync for TypedMemoryPool<T>
impl<T> Unpin for TypedMemoryPool<T>
impl<T> UnwindSafe for TypedMemoryPool<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