pub struct PacketAllocator { /* private fields */ }Expand description
A simple packet allocator that reuses buffers.
Implementations§
Source§impl PacketAllocator
impl PacketAllocator
Sourcepub fn deallocate(&mut self, buffer: Vec<u8>)
pub fn deallocate(&mut self, buffer: Vec<u8>)
Returns a buffer to the pool for reuse.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PacketAllocator
impl RefUnwindSafe for PacketAllocator
impl Send for PacketAllocator
impl Sync for PacketAllocator
impl Unpin for PacketAllocator
impl UnwindSafe for PacketAllocator
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