pub struct TokioBumpAlloc { /* private fields */ }Expand description
Allocate object in Bump within async task when dropped ,it will spawn a task to wait all BumpRef dropped. when all BumpRef dropped,it will drop RecycleableBump,and the Bump will be reset and release back to pool
Implementations§
Source§impl TokioBumpAlloc
impl TokioBumpAlloc
pub fn new(handle: Handle, bump: RecycleableBump) -> Self
Trait Implementations§
Source§impl BumpAlloc for TokioBumpAlloc
impl BumpAlloc for TokioBumpAlloc
Source§fn alloc<T>(&self, val: T) -> BumpObjectwhere
T: Send + 'static,
fn alloc<T>(&self, val: T) -> BumpObjectwhere
T: Send + 'static,
alloc a BumpObject in the Bump managed
Auto Trait Implementations§
impl !Freeze for TokioBumpAlloc
impl !RefUnwindSafe for TokioBumpAlloc
impl Send for TokioBumpAlloc
impl !Sync for TokioBumpAlloc
impl Unpin for TokioBumpAlloc
impl !UnwindSafe for TokioBumpAlloc
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