pub enum Combinator {
Identity,
Sequence(Vec<Combinator>),
Parallel(Vec<Combinator>),
Choice(Vec<Combinator>),
Guard(Box<Combinator>, Predicate),
Transform(Box<Combinator>, TransformFn),
Retry(Box<Combinator>, RetryPolicy),
Timeout(Box<Combinator>, Duration),
Checkpoint(Box<Combinator>, CheckpointId),
}Expand description
The combinator algebra terms.
Variants§
Identity
Pass-through: returns the input as output.
Sequence(Vec<Combinator>)
All must succeed in order.
Parallel(Vec<Combinator>)
All must succeed (order-independent; we process left-to-right).
Choice(Vec<Combinator>)
First success wins.
Guard(Box<Combinator>, Predicate)
Proceed only if predicate holds.
Transform(Box<Combinator>, TransformFn)
Modify the result of the inner combinator.
Retry(Box<Combinator>, RetryPolicy)
Retry with policy.
Timeout(Box<Combinator>, Duration)
Deterministically budget-bounded reduction.
Checkpoint(Box<Combinator>, CheckpointId)
Resumable checkpoint.
Trait Implementations§
Source§impl Clone for Combinator
impl Clone for Combinator
Source§fn clone(&self) -> Combinator
fn clone(&self) -> Combinator
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 moreSource§impl Debug for Combinator
impl Debug for Combinator
Source§impl<'de> Deserialize<'de> for Combinator
impl<'de> Deserialize<'de> for Combinator
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Combinator
impl RefUnwindSafe for Combinator
impl Send for Combinator
impl Sync for Combinator
impl Unpin for Combinator
impl UnsafeUnpin for Combinator
impl UnwindSafe for Combinator
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more