[−][src]Struct background_jobs::QueueHandle
A handle to the job server, used for queuing new jobs
QueueHandle
should be stored in your application's state in order to allow all parts of your
application to spawn jobs.
Methods
impl QueueHandle
[src]
pub fn queue<J>(&self, job: J) -> Result<(), Error> where
J: Job,
[src]
J: Job,
Queues a job for execution
This job will be sent to the server for storage, and will execute whenever a worker for the job's queue is free to do so.
pub fn every<J>(&self, duration: Duration, job: J) where
J: Job + Clone + 'static,
[src]
J: Job + Clone + 'static,
Queues a job for recurring execution
This job will be added to it's queue on the server once every Duration
. It will be
processed whenever workers are free to do so.
pub fn get_stats(
&self
) -> Box<dyn Future<Item = Stats, Error = Error> + 'static + Send>
[src]
&self
) -> Box<dyn Future<Item = Stats, Error = Error> + 'static + Send>
Return an overview of the processor's statistics
Trait Implementations
impl Clone for QueueHandle
[src]
fn clone(&self) -> QueueHandle
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl Send for QueueHandle
impl Unpin for QueueHandle
impl Sync for QueueHandle
impl !UnwindSafe for QueueHandle
impl !RefUnwindSafe for QueueHandle
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,