[][src]Enum hierarchical_hash_wheel_timer::TimerEntry

pub enum TimerEntry<I, O, P> where
    I: Hash + Clone + Eq,
    O: OneshotState<Id = I>,
    P: PeriodicState<Id = I>, 
{ OneShot { timeout: Duration, state: O, }, Periodic { delay: Duration, period: Duration, state: P, }, }

A concrete entry for an outstanding timeout

Variants

OneShot

A one-off timer

Fields of OneShot

timeout: Duration

The length of the timeout

state: O

The information to store along with the timer

Periodic

A recurring timer

Fields of Periodic

delay: Duration

The delay until the action is first invoked

period: Duration

The time between action invocations

state: P

The information to store along with the timer

Methods

impl<I, O, P> TimerEntry<I, O, P> where
    I: Hash + Clone + Eq,
    O: OneshotState<Id = I>,
    P: PeriodicState<Id = I>, 
[src]

pub fn id(&self) -> &I[src]

A reference to the id associated with this entry

Equals calling the id() function on either state type.

pub fn delay(&self) -> &Duration[src]

Returns the time until the timeout is supposed to be triggered

Trait Implementations

impl<I: Debug, O: Debug, P: Debug> Debug for TimerEntry<I, O, P> where
    I: Hash + Clone + Eq,
    O: OneshotState<Id = I>,
    P: PeriodicState<Id = I>, 
[src]

Auto Trait Implementations

impl<I, O, P> RefUnwindSafe for TimerEntry<I, O, P> where
    O: RefUnwindSafe,
    P: RefUnwindSafe

impl<I, O, P> Send for TimerEntry<I, O, P> where
    O: Send,
    P: Send

impl<I, O, P> Sync for TimerEntry<I, O, P> where
    O: Sync,
    P: Sync

impl<I, O, P> Unpin for TimerEntry<I, O, P> where
    O: Unpin,
    P: Unpin

impl<I, O, P> UnwindSafe for TimerEntry<I, O, P> where
    O: UnwindSafe,
    P: UnwindSafe

Blanket Implementations

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

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

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

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,