[][src]Struct tokio_timer::timer::Handle

pub struct Handle { /* fields omitted */ }
[]

Handle to timer instance.

The Handle allows creating Delay instances that are driven by the associated timer.

A Handle is obtained by calling Timer::handle, Handle::current, or Handle::default.

Methods

impl Handle[src][]

pub fn current() -> Handle[src][]

Returns a handle to the current timer.

The current timer is the timer that is currently set as default using with_default.

This function should only be called from within the context of with_default. Calling this function from outside of this context will return a Handle that does not reference a timer. Delay instances created with this handle will error.

See type level documentation for more ways to obtain a Handle value.

pub fn delay(&self, deadline: Instant) -> Delay[src][]

Create a Delay driven by this handle's associated Timer.

pub fn deadline<T>(&self, future: T, deadline: Instant) -> Deadline<T>[src][]

Create a Deadline driven by this handle's associated Timer.

pub fn interval(&self, at: Instant, duration: Duration) -> Interval[src][]

Create a new Interval that starts at at and yields every duration interval after that.

Trait Implementations

impl Default for Handle[src][+]

impl Clone for Handle[src][+]

fn clone_from(&mut self, source: &Self)
1.0.0
[src][]

Performs copy-assignment from source. Read more

impl Debug for Handle[src][+]

Auto Trait Implementations

impl Send for Handle

impl Sync for Handle

Blanket Implementations

impl<T> From for T[src][]

impl<T, U> Into for T where
    U: From<T>, 
[src][]

impl<T> ToOwned for T where
    T: Clone
[src][]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src][]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src][]

impl<T> BorrowMut for T where
    T: ?Sized
[src][]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src][]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src][]