pub struct BackgroundJobSystem { /* private fields */ }Expand description
Background job system (Redis-style BIO)
Implementations§
Source§impl BackgroundJobSystem
impl BackgroundJobSystem
Sourcepub fn submit(&self, job: Box<dyn BackgroundJob>)
pub fn submit(&self, job: Box<dyn BackgroundJob>)
Submit a background job
Sourcepub fn pending_jobs(&self, job_type: BackgroundJobType) -> usize
pub fn pending_jobs(&self, job_type: BackgroundJobType) -> usize
Get pending jobs count for a job type
Sourcepub fn jobs_processed(&self, job_type: BackgroundJobType) -> u64
pub fn jobs_processed(&self, job_type: BackgroundJobType) -> u64
Get total jobs processed for a job type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BackgroundJobSystem
impl RefUnwindSafe for BackgroundJobSystem
impl Send for BackgroundJobSystem
impl Sync for BackgroundJobSystem
impl Unpin for BackgroundJobSystem
impl UnwindSafe for BackgroundJobSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more