pub struct WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>where
W: Workflow<C, WorkItem: 'static>,
C: Context + Merge + Default,
Q: WorkQueue<C, W::WorkItem> + Send + Sync,
RIS: RunInfoStore + Send + Sync,
MS: MetricsStore + Send + Sync,
ES: ErrorStore + Send + Sync,
LS: LivenessStore + Send + Sync,
WISS: WorkItemStateStore<W::WorkItem> + Send + Sync,
CS: ContextStore<C> + Send + Sync + Clone + 'static,{ /* private fields */ }Implementations§
Source§impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>where
W: Workflow<C, WorkItem: 'static>,
C: Context + Merge + Default,
Q: WorkQueue<C, W::WorkItem> + Send + Sync,
RIS: RunInfoStore + Send + Sync,
MS: MetricsStore + Send + Sync,
ES: ErrorStore + Send + Sync,
LS: LivenessStore + Send + Sync,
WISS: WorkItemStateStore<W::WorkItem> + Send + Sync,
CS: ContextStore<C> + Send + Sync + Clone + 'static,
impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>where
W: Workflow<C, WorkItem: 'static>,
C: Context + Merge + Default,
Q: WorkQueue<C, W::WorkItem> + Send + Sync,
RIS: RunInfoStore + Send + Sync,
MS: MetricsStore + Send + Sync,
ES: ErrorStore + Send + Sync,
LS: LivenessStore + Send + Sync,
WISS: WorkItemStateStore<W::WorkItem> + Send + Sync,
CS: ContextStore<C> + Send + Sync + Clone + 'static,
pub fn new() -> Self
pub fn workflow(self, workflow: W) -> Self
pub fn queue(self, queue: Q) -> Self
pub fn context_store(self, context_store: CS) -> Self
pub fn run_info_store(self, ris: RIS) -> Self
pub fn metrics_store(self, ms: MS) -> Self
pub fn error_store(self, es: ES) -> Self
pub fn liveness_store(self, ls: LS) -> Self
pub fn work_item_state_store(self, wiss: WISS) -> Self
pub fn retry_policy(self, policy: RetryPolicy) -> Self
pub fn idle_sleep_duration(self, duration: Duration) -> Self
pub fn idle_sleep_jitter(self, jitter: Duration) -> Self
pub fn build(
self,
) -> Result<DistributedWorker<W, C, Q, RIS, MS, ES, LS, WISS, CS>, String>where
W: Workflow<C, WorkItem: 'static>,
C: Debug + Clone + Send + Sync,
Q: WorkQueue<C, W::WorkItem> + Send + Sync,
RIS: RunInfoStore + Send + Sync,
MS: MetricsStore + Send + Sync,
ES: ErrorStore + Send + Sync,
LS: LivenessStore + Send + Sync,
WISS: WorkItemStateStore<W::WorkItem> + Send + Sync,
CS: ContextStore<C> + Send + Sync + Clone + 'static,
Trait Implementations§
Source§impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> Default for WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>where
W: Workflow<C, WorkItem: 'static>,
C: Context + Merge + Default,
Q: WorkQueue<C, W::WorkItem> + Send + Sync,
RIS: RunInfoStore + Send + Sync,
MS: MetricsStore + Send + Sync,
ES: ErrorStore + Send + Sync,
LS: LivenessStore + Send + Sync,
WISS: WorkItemStateStore<W::WorkItem> + Send + Sync,
CS: ContextStore<C> + Send + Sync + Clone + 'static,
impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> Default for WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>where
W: Workflow<C, WorkItem: 'static>,
C: Context + Merge + Default,
Q: WorkQueue<C, W::WorkItem> + Send + Sync,
RIS: RunInfoStore + Send + Sync,
MS: MetricsStore + Send + Sync,
ES: ErrorStore + Send + Sync,
LS: LivenessStore + Send + Sync,
WISS: WorkItemStateStore<W::WorkItem> + Send + Sync,
CS: ContextStore<C> + Send + Sync + Clone + 'static,
Auto Trait Implementations§
impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> Freeze for WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>
impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> RefUnwindSafe for WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>where
W: RefUnwindSafe,
Q: RefUnwindSafe,
CS: RefUnwindSafe,
RIS: RefUnwindSafe,
MS: RefUnwindSafe,
ES: RefUnwindSafe,
LS: RefUnwindSafe,
WISS: RefUnwindSafe,
C: RefUnwindSafe,
impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> Send for WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>
impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> Sync for WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>
impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> Unpin for WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>
impl<W, C, Q, RIS, MS, ES, LS, WISS, CS> UnwindSafe for WorkerBuilder<W, C, Q, RIS, MS, ES, LS, WISS, CS>where
W: UnwindSafe,
Q: UnwindSafe,
CS: UnwindSafe,
RIS: UnwindSafe,
MS: UnwindSafe,
ES: UnwindSafe,
LS: UnwindSafe,
WISS: UnwindSafe,
C: UnwindSafe,
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