pub struct WorkflowSupervisorConfig { /* private fields */ }Expand description
Validated policy for continuous worker polling and bounded concurrency.
Implementations§
Source§impl WorkflowSupervisorConfig
impl WorkflowSupervisorConfig
Sourcepub fn new(max_concurrency: usize) -> Result<Self, WorkflowWorkerError>
pub fn new(max_concurrency: usize) -> Result<Self, WorkflowWorkerError>
Creates a supervisor configuration with a 10 ms to 5 second idle backoff.
§Errors
Rejects zero concurrency.
Sourcepub fn with_backoff(
self,
initial: Duration,
maximum: Duration,
) -> Result<Self, WorkflowWorkerError>
pub fn with_backoff( self, initial: Duration, maximum: Duration, ) -> Result<Self, WorkflowWorkerError>
Sets the exponential backoff used after idle polls and infrastructure errors.
§Errors
Rejects zero delays or a maximum shorter than the initial delay.
Sourcepub const fn max_concurrency(self) -> usize
pub const fn max_concurrency(self) -> usize
Returns the maximum number of simultaneous claim-and-execute cycles.
Trait Implementations§
Source§impl Clone for WorkflowSupervisorConfig
impl Clone for WorkflowSupervisorConfig
Source§fn clone(&self) -> WorkflowSupervisorConfig
fn clone(&self) -> WorkflowSupervisorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WorkflowSupervisorConfig
Source§impl Debug for WorkflowSupervisorConfig
impl Debug for WorkflowSupervisorConfig
impl Eq for WorkflowSupervisorConfig
Source§impl PartialEq for WorkflowSupervisorConfig
impl PartialEq for WorkflowSupervisorConfig
impl StructuralPartialEq for WorkflowSupervisorConfig
Auto Trait Implementations§
impl Freeze for WorkflowSupervisorConfig
impl RefUnwindSafe for WorkflowSupervisorConfig
impl Send for WorkflowSupervisorConfig
impl Sync for WorkflowSupervisorConfig
impl Unpin for WorkflowSupervisorConfig
impl UnsafeUnpin for WorkflowSupervisorConfig
impl UnwindSafe for WorkflowSupervisorConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.