pub struct JournalChainVerifier { /* private fields */ }Expand description
Streaming verifier for a complete journal or a suffix after a trusted head.
Each accepted event must be individually self-validating, in the same scope, exactly one sequence after the current head, chained to its digest, and no earlier in durable time. Rejection leaves the verifier unchanged.
Implementations§
Source§impl JournalChainVerifier
impl JournalChainVerifier
Sourcepub const fn after(head: JournalHead) -> Self
pub const fn after(head: JournalHead) -> Self
Constructs a suffix verifier after a trusted checkpoint or archive head.
Sourcepub const fn head(&self) -> Option<&JournalHead>
pub const fn head(&self) -> Option<&JournalHead>
Returns the most recently accepted head.
Sourcepub fn verify_next(
&mut self,
event: &JournalEvent,
) -> Result<(), JournalChainError>
pub fn verify_next( &mut self, event: &JournalEvent, ) -> Result<(), JournalChainError>
Verifies and accepts the next event without buffering payload history.
§Errors
Returns JournalChainError for intrinsic corruption, wrong scope,
sequence gaps, predecessor mismatch, or durable-clock regression.
Trait Implementations§
Source§impl Debug for JournalChainVerifier
impl Debug for JournalChainVerifier
Auto Trait Implementations§
impl Forget for JournalChainVerifier
impl Freeze for JournalChainVerifier
impl Move for JournalChainVerifier
impl RefUnwindSafe for JournalChainVerifier
impl Send for JournalChainVerifier
impl Sync for JournalChainVerifier
impl Unpin for JournalChainVerifier
impl UnsafeUnpin for JournalChainVerifier
impl UnwindSafe for JournalChainVerifier
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