Trait pasts::Executor [−][src]
pub trait Executor: Sized + Send + Sync + 'static { fn sleep(&self); fn wake(&self) { ... } fn block_on_pinned<F>(self, future: F)
where
F: Future<Output = ()> + Unpin + 'static, { ... } fn block_on<F: Future<Output = ()> + 'static>(self, future: F) { ... } }
Expand description
Trait for implementing custom executors. Useful when targetting no-std.
Required methods
Provided methods
The wake routine; should wake the processor or thread. If the hardware is already waked up automatically, this doesn’t need to be implemented.
fn block_on_pinned<F>(self, future: F) where
F: Future<Output = ()> + Unpin + 'static,
fn block_on_pinned<F>(self, future: F) where
F: Future<Output = ()> + Unpin + 'static,
Block on an unpin future on the current thread.