[][src]Struct hierarchical_hash_wheel_timer::PeriodicClosureState

pub struct PeriodicClosureState<I> { /* fields omitted */ }

A timeout state for a periodic timer using a closure as the triggering action

Methods

impl<I> PeriodicClosureState<I>[src]

pub fn new<F>(id: I, action: F) -> Self where
    F: FnMut(I) -> TimerReturn<()> + Send + 'static, 
[src]

Produces a new instance of this state type from a unique id and the action to be executed every time it expires.

impl PeriodicClosureState<Uuid>[src]

pub fn with_random_id<F>(action: F) -> Self where
    F: FnMut(Uuid) -> TimerReturn<()> + Send + 'static, 
[src]

Produces a new instance of this state type using a random unique id and the action to be executed every time it expires.

Uses Uuid::new_v4() internally.

Trait Implementations

impl<I> Debug for PeriodicClosureState<I> where
    I: Hash + Clone + Eq + Debug
[src]

impl<I> PeriodicState for PeriodicClosureState<I> where
    I: Hash + Clone + Eq
[src]

type Id = I

The type of the unique id of the outstanding timeout

Auto Trait Implementations

impl<I> !RefUnwindSafe for PeriodicClosureState<I>

impl<I> Send for PeriodicClosureState<I> where
    I: Send

impl<I> !Sync for PeriodicClosureState<I>

impl<I> Unpin for PeriodicClosureState<I> where
    I: Unpin

impl<I> !UnwindSafe for PeriodicClosureState<I>

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>,