[−][src]Struct scheduling::Scheduler
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]
F: FnMut() + Send + 'static,
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]
F: FnMut() + Send + 'static,
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]
F: FnMut() + Send + 'static,
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]
F: FnMut() + Send + 'static,
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
Auto Trait Implementations
impl !RefUnwindSafe for Scheduler
impl Send for Scheduler
impl !Sync for Scheduler
impl Unpin for Scheduler
impl !UnwindSafe for Scheduler
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,