[][src]Struct smartpool::timescheduler::TimeScheduler

pub struct TimeScheduler { /* fields omitted */ }

A thread that schedules events to occur in the future.

Methods

impl TimeScheduler[src]

pub fn new() -> Self[src]

pub fn at(&self, moment: SteadyTime) -> FutureMoment[src]

A future that occurs at the given moment.

pub fn after(&self, delay: Duration) -> FutureMoment[src]

A future that occurs after the given delay.

pub fn periodically(
    &self,
    start: SteadyTime,
    period: Duration
) -> PeriodicMoments
[src]

A stream that produces values on a set interval.

pub fn run_at(
    &self,
    moment: SteadyTime,
    future: impl Future<Item = (), Error = ()> + Send + 'static,
    exec: impl Exec + Send + 'static
)
[src]

Run a future in an executor at a moment in the future.

pub fn run_at_param<P: Send + 'static>(
    &self,
    moment: SteadyTime,
    future: impl Future<Item = (), Error = ()> + Send + 'static,
    exec: impl ExecParam<Param = P> + Send + 'static,
    param: P
)
[src]

Run a future in an executor with a parameter at a moment in the future.

pub fn run_after(
    &self,
    delay: Duration,
    future: impl Future<Item = (), Error = ()> + Send + 'static,
    exec: impl Exec + Send + 'static
)
[src]

Run a future in an executor after a delay.

pub fn run_after_param<P: Send + 'static>(
    &self,
    delay: Duration,
    future: impl Future<Item = (), Error = ()> + Send + 'static,
    exec: impl ExecParam<Param = P> + Send + 'static,
    param: P
)
[src]

Run a future in an executor with a parameter after a delay.

Trait Implementations

impl Clone for TimeScheduler[src]

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

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T[src]

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

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[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]