pub struct ReplayExecutor<L: ReplayLog, I: EffectInvoker> {
pub log: L,
pub invoker: I,
}Fields§
§log: L§invoker: IImplementations§
Source§impl<L: ReplayLog, I: EffectInvoker> ReplayExecutor<L, I>
impl<L: ReplayLog, I: EffectInvoker> ReplayExecutor<L, I>
pub fn new(log: L, invoker: I) -> Self
Sourcepub async fn replay_token(
&self,
token_hash_hex: &str,
) -> Result<ReplayOutcome, ReplayExecutorError>
pub async fn replay_token( &self, token_hash_hex: &str, ) -> Result<ReplayOutcome, ReplayExecutorError>
Replay a single token; return the outcome.
Sourcepub async fn replay_flow(
&self,
flow_id: &str,
) -> Result<Vec<ReplayOutcome>, ReplayExecutorError>
pub async fn replay_flow( &self, flow_id: &str, ) -> Result<Vec<ReplayOutcome>, ReplayExecutorError>
Replay every token for a flow, short-circuiting at the first
divergence. Adopters that prefer to collect every divergence
can call Self::verify_token in a custom loop.
Sourcepub async fn verify_token(
&self,
token: &ReplayToken,
) -> Result<ReplayOutcome, EffectInvokerError>
pub async fn verify_token( &self, token: &ReplayToken, ) -> Result<ReplayOutcome, EffectInvokerError>
Low-level — given a concrete token, re-invoke + compare.
Auto Trait Implementations§
impl<L, I> Freeze for ReplayExecutor<L, I>
impl<L, I> RefUnwindSafe for ReplayExecutor<L, I>where
L: RefUnwindSafe,
I: RefUnwindSafe,
impl<L, I> Send for ReplayExecutor<L, I>
impl<L, I> Sync for ReplayExecutor<L, I>
impl<L, I> Unpin for ReplayExecutor<L, I>
impl<L, I> UnsafeUnpin for ReplayExecutor<L, I>where
L: UnsafeUnpin,
I: UnsafeUnpin,
impl<L, I> UnwindSafe for ReplayExecutor<L, I>where
L: UnwindSafe,
I: 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
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 moreCreates a shared type from an unshared type.