Struct background_jobs_core::CachedProcessorMap
source · pub struct CachedProcessorMap<S> { /* private fields */ }
Expand description
A type for storing the relationships between job names and the job itself, with the state pre-cached instead of being generated from the state function each time
Job
s must be registered with the ProcessorMap
in the initialization phase of an
application before workers are spawned in order to handle queued jobs.
Implementations§
source§impl<S> CachedProcessorMap<S>where
S: Clone + 'static,
impl<S> CachedProcessorMap<S>where
S: Clone + 'static,
sourcepub async fn process(&self, job: JobInfo) -> ReturnJobInfo
pub async fn process(&self, job: JobInfo) -> ReturnJobInfo
Process a given job
This should not be called from outside implementations of a backgoround-jobs runtime. It is intended for internal use.
Trait Implementations§
source§impl<S: Clone> Clone for CachedProcessorMap<S>
impl<S: Clone> Clone for CachedProcessorMap<S>
source§fn clone(&self) -> CachedProcessorMap<S>
fn clone(&self) -> CachedProcessorMap<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<S> Freeze for CachedProcessorMap<S>where
S: Freeze,
impl<S> !RefUnwindSafe for CachedProcessorMap<S>
impl<S> Send for CachedProcessorMap<S>where
S: Send,
impl<S> Sync for CachedProcessorMap<S>where
S: Sync,
impl<S> Unpin for CachedProcessorMap<S>where
S: Unpin,
impl<S> !UnwindSafe for CachedProcessorMap<S>
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