Struct lightspeed_scheduler::job::Job [−][src]
pub struct Job { /* fields omitted */ }
Implementations
impl Job
[src]
impl Job
[src]pub fn new<G: Into<String>, N: Into<String>, F: 'static + Send + Fn() -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send>>>(
group: G,
name: N,
retries_after_failure: Option<u64>,
function: F
) -> Self
[src]
group: G,
name: N,
retries_after_failure: Option<u64>,
function: F
) -> Self
pub async fn is_running(&self) -> bool
[src]
pub async fn is_running(&self) -> bool
[src]Returns true if this job is currently running.
pub fn name(&self) -> &str
[src]
pub fn group(&self) -> &str
[src]
pub async fn run(&self) -> Result<(), SchedulerError>
[src]
pub async fn run(&self) -> Result<(), SchedulerError>
[src]Run the job immediately and re-schedule it.
Auto Trait Implementations
impl !RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl !UnwindSafe for Job
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> 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