pub struct Enter { /* private fields */ }
Expand description
Represents an executor context.
For more details, see enter
documentation
Implementations§
Source§impl 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 Freeze for Enter
impl !RefUnwindSafe for Enter
impl !Send for Enter
impl !Sync for Enter
impl Unpin for Enter
impl !UnwindSafe for Enter
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