Struct tokio_executor::Enter
source · [−]pub struct Enter { /* private fields */ }
Expand description
Represents an executor context.
For more details, see enter
documentation
Implementations
sourceimpl Enter
impl Enter
sourcepub fn on_exit<F>(&mut self, f: F) where
F: FnOnce() + 'static,
pub fn on_exit<F>(&mut self, f: F) where
F: FnOnce() + 'static,
Register a callback to be invoked if and when the thread ceased to act as an executor.
sourcepub fn make_permanent(self)
pub fn make_permanent(self)
Treat the remainder of execution on this thread as part of an executor; used mostly for thread pool worker threads.
All registered on_exit
callbacks are dropped without being
invoked.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Enter
impl !Send for Enter
impl !Sync for Enter
impl Unpin for Enter
impl !UnwindSafe for Enter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more