pub struct PooledBuffer { /* private fields */ }Expand description
A buffer that returns to the pool when dropped
Implementations§
Source§impl PooledBuffer
impl PooledBuffer
Sourcepub fn buffer_mut(&mut self) -> &mut Vec<u8> ⓘ
pub fn buffer_mut(&mut self) -> &mut Vec<u8> ⓘ
Get the underlying buffer
Sourcepub fn take_bytes(&mut self) -> Bytes
pub fn take_bytes(&mut self) -> Bytes
Take ownership of the buffer contents as Bytes
Trait Implementations§
Source§impl Drop for PooledBuffer
impl Drop for PooledBuffer
Auto Trait Implementations§
impl Forget for PooledBuffer
impl Freeze for PooledBuffer
impl Move for PooledBuffer
impl RefUnwindSafe for PooledBuffer
impl Send for PooledBuffer
impl Sync for PooledBuffer
impl Unpin for PooledBuffer
impl UnsafeUnpin for PooledBuffer
impl UnwindSafe for PooledBuffer
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