Struct lightspeed_scheduler::JobExecutor [−][src]
pub struct JobExecutor { /* fields omitted */ }
Implementations
impl JobExecutor
[src]
impl JobExecutor
[src]pub async fn add_job(
&self,
schedule: &dyn TryToScheduler,
job: Job
) -> Result<(), SchedulerError>
[src]
pub async fn add_job(
&self,
schedule: &dyn TryToScheduler,
job: Job
) -> Result<(), SchedulerError>
[src]Adds a job to the JobExecutor.
pub async fn add_job_with_multi_schedule(
&self,
schedule: &[&dyn TryToScheduler],
job: Job
) -> Result<(), SchedulerError>
[src]
pub async fn add_job_with_multi_schedule(
&self,
schedule: &[&dyn TryToScheduler],
job: Job
) -> Result<(), SchedulerError>
[src]Adds a job to the JobExecutor.
pub async fn add_job_with_scheduler<S: Into<Scheduler>>(
&self,
schedule: S,
job: Job
)
[src]
pub async fn add_job_with_scheduler<S: Into<Scheduler>>(
&self,
schedule: S,
job: Job
)
[src]Adds a job to the JobExecutor.
pub async fn run(&self) -> Result<JoinHandle<()>, SchedulerError>
[src]
pub async fn run(&self) -> Result<JoinHandle<()>, SchedulerError>
[src]Starts the JobExecutor
pub fn set_sleep_between_checks(&self, sleep: Duration)
[src]
pub fn set_sleep_between_checks(&self, sleep: Duration)
[src]Sets the sleep time between checks for pending Jobs. The default is 1 second.
Trait Implementations
impl Clone for JobExecutor
[src]
impl Clone for JobExecutor
[src]fn clone(&self) -> JobExecutor
[src]
fn clone(&self) -> JobExecutor
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for JobExecutor
impl Send for JobExecutor
impl Sync for JobExecutor
impl Unpin for JobExecutor
impl !UnwindSafe for JobExecutor
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more