[][src]Struct ticktock::timer::TimerBuilder

pub struct TimerBuilder<F, V, R> where
    F: Fn(Duration, &mut V) -> R, 
{ /* fields omitted */ }

A timer builder

Internally used to construct timers; cannot be constructed manually.

Methods

impl<F, V, R> TimerBuilder<F, V, R> where
    F: Fn(Duration, &mut V) -> R, 
[src]

pub fn every(self, interval: Duration) -> Self[src]

Execute time in fixed intervals

The timer will repeat after waiting interval. Time spent executing the timer is ignored.

pub fn once(self, delay: Duration) -> Self[src]

Execute once after a delay

pub fn start(self, now: Instant) -> Timer<F, V, R>[src]

Start the timer

Starting means recording the passed in now as the timer's start time (and basis for calculations).

Trait Implementations

impl<F: Debug, V: Debug, R: Debug> Debug for TimerBuilder<F, V, R> where
    F: Fn(Duration, &mut V) -> R, 
[src]

Auto Trait Implementations

impl<F, V, R> RefUnwindSafe for TimerBuilder<F, V, R> where
    F: RefUnwindSafe,
    V: RefUnwindSafe

impl<F, V, R> Send for TimerBuilder<F, V, R> where
    F: Send,
    V: Send

impl<F, V, R> Sync for TimerBuilder<F, V, R> where
    F: Sync,
    V: Sync

impl<F, V, R> Unpin for TimerBuilder<F, V, R> where
    F: Unpin,
    V: Unpin

impl<F, V, R> UnwindSafe for TimerBuilder<F, V, R> where
    F: UnwindSafe,
    V: 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.