pub struct RetryFlow;Expand description
Akka-style RetryFlow.withBackoff helpers.
The wrapped flow must be one-in/one-out. Datum validates that at runtime and fails the stream if the wrapped flow emits zero or multiple outputs for a retried element.
Implementations§
Source§impl RetryFlow
impl RetryFlow
pub fn with_backoff<In, Out, Mat, Decide>( min_backoff: Duration, max_backoff: Duration, random_factor: f64, max_retries: usize, flow: Flow<In, Out, Mat>, decide_retry: Decide, ) -> Flow<In, Out>
pub fn with_backoff_and_context<In, CtxIn, Out, CtxOut, Mat, Decide>( min_backoff: Duration, max_backoff: Duration, random_factor: f64, max_retries: usize, flow: FlowWithContext<In, CtxIn, Out, CtxOut, Mat>, decide_retry: Decide, ) -> FlowWithContext<In, CtxIn, Out, CtxOut>
Auto Trait Implementations§
impl Freeze for RetryFlow
impl RefUnwindSafe for RetryFlow
impl Send for RetryFlow
impl Sync for RetryFlow
impl Unpin for RetryFlow
impl UnsafeUnpin for RetryFlow
impl UnwindSafe for RetryFlow
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage