pub struct Routine { /* private fields */ }Expand description
§A handle for a routine running in the background
Returned by ThreadPool::subscribe. Dropping the handle:
- Calls
unsubscribe(prevents future scheduling) - Frees the closure and all captured state (immediately if the callback is not running, or deferred to the callback otherwise)
Trait Implementations§
impl Send for Routine
impl Sync for Routine
Auto Trait Implementations§
impl Freeze for Routine
impl RefUnwindSafe for Routine
impl Unpin for Routine
impl UnsafeUnpin for Routine
impl UnwindSafe for Routine
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