pub enum Outcome<T, P> {
Replayed(T),
Live(P),
}Expand description
How the cursor answered a request: from recorded history, or with a permission to execute live.
This enum is the type-level encoding of the replay rule. A Replayed
value carries the recorded result and nothing else, so holding one gives
no way to execute. A Live value carries a permit (or, for operations
with no result, the Emitted event to persist), and permits are the
only path to recording a fresh result.
Variants§
Replayed(T)
The log already holds the answer. Use it; execute nothing.
Live(P)
History is exhausted at this operation. Execute it and record the result through the carried permit.
Trait Implementations§
Auto Trait Implementations§
impl<T, P> Freeze for Outcome<T, P>
impl<T, P> RefUnwindSafe for Outcome<T, P>where
T: RefUnwindSafe,
P: RefUnwindSafe,
impl<T, P> Send for Outcome<T, P>
impl<T, P> Sync for Outcome<T, P>
impl<T, P> Unpin for Outcome<T, P>
impl<T, P> UnsafeUnpin for Outcome<T, P>where
T: UnsafeUnpin,
P: UnsafeUnpin,
impl<T, P> UnwindSafe for Outcome<T, P>where
T: UnwindSafe,
P: 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