pub struct ModelInvocationHistoryVerifier { /* private fields */ }Expand description
Streaming validator for one complete ascending model invocation history.
Rejections are transactional: Self::verify_next never advances the last
accepted record on failure.
Implementations§
Source§impl ModelInvocationHistoryVerifier
impl ModelInvocationHistoryVerifier
Sourcepub fn after(record: ModelInvocation) -> Self
pub fn after(record: ModelInvocation) -> Self
Continues after one already trusted, fully restored record.
A paged store must reload and compare the cursor’s exact canonical record before using it. The full predecessor failure is needed for retry checks.
Sourcepub fn head(&self) -> Option<ModelInvocationHead>
pub fn head(&self) -> Option<ModelInvocationHead>
Returns the last verified head, if any.
Sourcepub const fn has_records(&self) -> bool
pub const fn has_records(&self) -> bool
Returns whether at least one revision has been verified.
Sourcepub fn verify_next(
&mut self,
record: &ModelInvocation,
) -> Result<(), ModelInvocationHistoryError>
pub fn verify_next( &mut self, record: &ModelInvocation, ) -> Result<(), ModelInvocationHistoryError>
Verifies and then advances to the next ascending revision.
§Errors
Returns ModelInvocationHistoryError for a non-initial first record,
intent substitution, head mismatch, unsafe retry, or any other state
transition failure.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ModelInvocationHistoryVerifier
impl !UnwindSafe for ModelInvocationHistoryVerifier
impl Forget for ModelInvocationHistoryVerifier
impl Freeze for ModelInvocationHistoryVerifier
impl Move for ModelInvocationHistoryVerifier
impl Send for ModelInvocationHistoryVerifier
impl Sync for ModelInvocationHistoryVerifier
impl Unpin for ModelInvocationHistoryVerifier
impl UnsafeUnpin for ModelInvocationHistoryVerifier
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