Struct tokio_executor::Enter [−][src]
pub struct Enter { /* fields omitted */ }
Represents an executor context.
For more details, see enter
documentation
Methods
impl Enter
[src]
impl Enter
pub fn on_exit<F>(&mut self, f: F) where
F: FnOnce() + 'static,
[src]
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.
pub fn make_permanent(self)
[src]
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.
pub fn block_on<F: Future>(&mut self, f: F) -> Result<F::Item, F::Error>
[src]
pub fn block_on<F: Future>(&mut self, f: F) -> Result<F::Item, F::Error>
Blocks the thread on the specified future, returning the value with which that future completes.
Trait Implementations
impl Debug for Enter
[src]
impl Debug for Enter
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Drop for Enter
[src]
impl Drop for Enter