pub struct FlushOnDrop<'g> { /* private fields */ }Expand description
Guard that flushes the retirement batch on drop.
When dropped, triggers seize to process any accumulated retirements. This allows reclamation to proceed more quickly once the guard is released.
§Example
ⓘ
let guard = tree.guard();
let _flush = FlushOnDrop::new(&guard);
// ... perform operations ...
// Batch is automatically flushed when _flush is droppedImplementations§
Source§impl<'g> FlushOnDrop<'g>
impl<'g> FlushOnDrop<'g>
Sourcepub const fn new(guard: &'g LocalGuard<'g>) -> Self
pub const fn new(guard: &'g LocalGuard<'g>) -> Self
Create a new flush guard.
Trait Implementations§
Source§impl<'g> Debug for FlushOnDrop<'g>
impl<'g> Debug for FlushOnDrop<'g>
Auto Trait Implementations§
impl<'g> Freeze for FlushOnDrop<'g>
impl<'g> !RefUnwindSafe for FlushOnDrop<'g>
impl<'g> !Send for FlushOnDrop<'g>
impl<'g> !Sync for FlushOnDrop<'g>
impl<'g> Unpin for FlushOnDrop<'g>
impl<'g> !UnwindSafe for FlushOnDrop<'g>
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