[][src]Struct async_timer::state::TimerState

pub struct TimerState { /* fields omitted */ }

Timer's state

Methods

impl TimerState[src]

pub const fn new() -> Self[src]

Initializes state.

pub fn is_done(&self) -> bool[src]

Returns whether notification has been fired.

Namely it checks whether Waker is registered with TimerState or not. It is not intended for user to call is_done before register

pub fn register(&self, waker: &Waker)[src]

Registers Waker with state

pub fn wake(&self)[src]

Notifies underlying Waker

After that Waker is no longer registered with TimerState

pub fn wake_by_ref(&self)[src]

Notifies underlying Waker without consuming it

Auto Trait Implementations

impl Send for TimerState

impl Sync for TimerState

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?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

The type returned in the event of a conversion error.