Struct cronic::Scheduler[][src]

pub struct Scheduler<C: 'static + Sized + Default + Clone> { /* fields omitted */ }

Cronic Scheduler

Implementations

impl<'a, C: 'static + Default + Clone> Scheduler<C>[src]

pub fn new() -> Self[src]

pub fn job<S: Into<String>>(
    mut self: Self,
    cron_str: S,
    job: &'static impl Fn(C) -> Pin<Box<dyn Future<Output = ()>>>
) -> Self
[src]

pub fn set_context(mut self: Self, context: C) -> Self[src]

pub async fn start(self) -> Result<(), Box<dyn Error>>[src]

Start the execution of the scheduled jobs

Auto Trait Implementations

impl<C> !RefUnwindSafe for Scheduler<C>[src]

impl<C> !Send for Scheduler<C>[src]

impl<C> !Sync for Scheduler<C>[src]

impl<C> Unpin for Scheduler<C> where
    C: Unpin
[src]

impl<C> !UnwindSafe for Scheduler<C>[src]

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.