pub struct Worker<Data, Comp, Ctx> {
pub stats: WorkerStats,
pub options: WorkerOptions,
/* private fields */
}Fields§
§stats: WorkerStats§options: WorkerOptionsImplementations§
Source§impl<Data, Comp, Ctx> Worker<Data, Comp, Ctx>where
Data: Debug + Clone + Serialize + DeserializeOwned + Send + Sync + 'static,
Comp: Computation<Data, Ctx> + Send + Sync + 'static,
Ctx: Configurable + Send + Sync + 'static,
A worker implementation that fetches a task from the storage, processes it,
and then updates the task status. If the processing fails,
the task is retried up to N times.
impl<Data, Comp, Ctx> Worker<Data, Comp, Ctx>where
Data: Debug + Clone + Serialize + DeserializeOwned + Send + Sync + 'static,
Comp: Computation<Data, Ctx> + Send + Sync + 'static,
Ctx: Configurable + Send + Sync + 'static,
A worker implementation that fetches a task from the storage, processes it, and then updates the task status. If the processing fails, the task is retried up to N times.
Trait Implementations§
Auto Trait Implementations§
impl<Data, Comp, Ctx> Freeze for Worker<Data, Comp, Ctx>
impl<Data, Comp, Ctx> !RefUnwindSafe for Worker<Data, Comp, Ctx>
impl<Data, Comp, Ctx> Send for Worker<Data, Comp, Ctx>
impl<Data, Comp, Ctx> Sync for Worker<Data, Comp, Ctx>
impl<Data, Comp, Ctx> Unpin for Worker<Data, Comp, Ctx>
impl<Data, Comp, Ctx> !UnwindSafe for Worker<Data, Comp, Ctx>
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