[][src]Struct scheduling::Scheduler

pub struct Scheduler { /* fields omitted */ }

The Scheduler container

Implementations

impl Scheduler[src]

pub fn handle(&self) -> SchedulerHandle[src]

Get the SchedulerHandle for this scheduler. Can be used to setup tasks that cancel themselves on some condition.

pub fn once<F>(f: F) -> Self where
    F: FnMut() + Send + 'static, 
[src]

Create a scheduler to run a one-time job in a background thread

pub fn delayed_once<F>(delay: Duration, f: F) -> Self where
    F: FnMut() + Send + 'static, 
[src]

Create a scheduler to run a one-time job with an initial delay

pub fn recurring<F>(rate: Duration, f: F) -> Self where
    F: FnMut() + Send + 'static, 
[src]

Create a scheduler to run a recurring job at a fixed rate

pub fn delayed_recurring<F>(delay: Duration, rate: Duration, f: F) -> Self where
    F: FnMut() + Send + 'static, 
[src]

Create a scheduler to run a recurring job at a fixed rate, with an initial delay

pub fn start(self) -> SchedulerHandle[src]

Start running the Scheduler and return its handle

Trait Implementations

impl Default for Scheduler[src]

Auto Trait Implementations

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.