Struct wombo::Hooks
[−]
[src]
pub struct Hooks<T: Send + 'static> { /* fields omitted */ }
A struct for receiving notifications when the event loop is canceled.
Methods
impl<T: Send + 'static> Hooks<T>
[src]
fn new(id: usize) -> Hooks<T>
[src]
fn thread_id(&self) -> usize
[src]
The thread ID of the event loop thread.
fn on_cancel<Fut, F>(&self, func: F) where
Fut: IntoFuture<Item = T, Error = ()> + 'static,
F: FnOnce() -> Fut + 'static,
[src]
Fut: IntoFuture<Item = T, Error = ()> + 'static,
F: FnOnce() -> Fut + 'static,
Register a function to be called on the event loop when cancel
is called.