pub struct Sweeper(/* private fields */);Expand description
A running sweeper, which stops when this value is dropped.
A guard rather than a bare JoinHandle because the task outlives every
scope that could remember to stop it otherwise: crate::serve is itself
commonly aborted (a test tearing a server down, a shutdown signal), and an
abort runs no cleanup code, only drops. Dropping the guard is therefore the
only teardown that always happens.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sweeper
impl RefUnwindSafe for Sweeper
impl Send for Sweeper
impl Sync for Sweeper
impl Unpin for Sweeper
impl UnsafeUnpin for Sweeper
impl UnwindSafe for Sweeper
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