pub struct OutputLedger<O> { /* private fields */ }Expand description
Fake output consumer ledger for materialized output frames.
Implementations§
Source§impl<O: Clone + PartialEq> OutputLedger<O>
impl<O: Clone + PartialEq> OutputLedger<O>
Sourcepub fn close_scope(&mut self, scope: ScopeId)
pub fn close_scope(&mut self, scope: ScopeId)
Marks a scope closed for later frame validation.
Sourcepub fn apply_result<C>(&mut self, result: &TransactionResult<C, O>)
pub fn apply_result<C>(&mut self, result: &TransactionResult<C, O>)
Applies all output frames from a transaction result.
Sourcepub fn apply_frame(&mut self, frame: &OutputFrame<O>)
pub fn apply_frame(&mut self, frame: &OutputFrame<O>)
Applies a single output frame.
Sourcepub fn snapshot(&self, key: OutputKey) -> Option<&OutputSnapshot<O>>
pub fn snapshot(&self, key: OutputKey) -> Option<&OutputSnapshot<O>>
Returns current output state.
Sourcepub fn errors(&self) -> &[OutputLedgerError]
pub fn errors(&self) -> &[OutputLedgerError]
Returns structural ledger errors observed while applying frames.
Sourcepub fn frame_trace(&self) -> &[OutputFrameTrace]
pub fn frame_trace(&self) -> &[OutputFrameTrace]
Returns frame traces in applied delivery order.
Sourcepub fn frame_records(&self) -> &[OutputFrame<O>]
pub fn frame_records(&self) -> &[OutputFrame<O>]
Returns applied output frames including typed payloads in delivery order.
Sourcepub fn assert_revision_monotonic(&self) -> Result<(), OutputLedgerError>
pub fn assert_revision_monotonic(&self) -> Result<(), OutputLedgerError>
Asserts no revision regressions or closed-scope frame errors occurred.
Sourcepub fn assert_no_frame_for_closed_scope_except_terminal(
&self,
) -> Result<(), OutputLedgerError>
pub fn assert_no_frame_for_closed_scope_except_terminal( &self, ) -> Result<(), OutputLedgerError>
Asserts closed scopes emitted no non-terminal output frames.
Sourcepub fn assert_closed_scope_cleared(
&self,
scope: ScopeId,
) -> Result<(), OutputLedgerError>
pub fn assert_closed_scope_cleared( &self, scope: ScopeId, ) -> Result<(), OutputLedgerError>
Asserts every output owned by a closed scope has been cleared.
Sourcepub fn assert_cleared(&self, key: OutputKey) -> Result<(), OutputLedgerError>
pub fn assert_cleared(&self, key: OutputKey) -> Result<(), OutputLedgerError>
Asserts an output key is currently cleared.
Sourcepub fn assert_current_equals(
&self,
key: OutputKey,
expected: &O,
) -> Result<(), OutputLedgerError>
pub fn assert_current_equals( &self, key: OutputKey, expected: &O, ) -> Result<(), OutputLedgerError>
Asserts the current consumer state equals an expected baseline.
Sourcepub fn assert_delta_sequence_matches_rebaseline(
&self,
key: OutputKey,
rebaseline: &O,
) -> Result<(), OutputLedgerError>
pub fn assert_delta_sequence_matches_rebaseline( &self, key: OutputKey, rebaseline: &O, ) -> Result<(), OutputLedgerError>
Asserts the current delta-applied state matches a rebaseline value.
Asserts the ledger observed no structural frame errors.
Source§impl<O> OutputLedger<O>
impl<O> OutputLedger<O>
Sourcepub fn to_debug_string(&self) -> Stringwhere
O: Debug,
pub fn to_debug_string(&self) -> Stringwhere
O: Debug,
Returns deterministic debug output for output ledger snapshots.
Trait Implementations§
Source§impl<O: Clone> Clone for OutputLedger<O>
impl<O: Clone> Clone for OutputLedger<O>
Source§fn clone(&self) -> OutputLedger<O>
fn clone(&self) -> OutputLedger<O>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<O: Debug> Debug for OutputLedger<O>
impl<O: Debug> Debug for OutputLedger<O>
Source§impl<O: Default> Default for OutputLedger<O>
impl<O: Default> Default for OutputLedger<O>
Source§fn default() -> OutputLedger<O>
fn default() -> OutputLedger<O>
impl<O: Eq> Eq for OutputLedger<O>
Source§impl<O: PartialEq> PartialEq for OutputLedger<O>
impl<O: PartialEq> PartialEq for OutputLedger<O>
Source§fn eq(&self, other: &OutputLedger<O>) -> bool
fn eq(&self, other: &OutputLedger<O>) -> bool
self and other values to be equal, and is used by ==.