Struct gjio::Timer
[−]
[src]
pub struct Timer { /* fields omitted */ }
Allows scheduling of timeouts.
Methods
impl Timer
[src]
fn after_delay(&self, delay: Duration) -> Promise<(), Error>
Returns a promise that will be fulfilled after the given delay.
fn timeout_after<T>(
&self,
delay: Duration,
promise: Promise<T, Error>
) -> Promise<T, Error>
&self,
delay: Duration,
promise: Promise<T, Error>
) -> Promise<T, Error>
Wraps the given promise in a timeout. If the original promise is not completed within that time, it is cancelled.
Trait Implementations
impl Clone for Timer
[src]
fn clone(&self) -> Timer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more