pub struct DraftStateTransaction<S: Clone> { /* private fields */ }Expand description
An exact speculative fork retaining both the pre-verification checkpoint and an independently advanceable draft state.
Model families supply ordinary cloneable runtime state; proposal, verification, commit, cancellation, and rejection all use this one neutral ownership boundary.
Implementations§
Source§impl<S: Clone> DraftStateTransaction<S>
impl<S: Clone> DraftStateTransaction<S>
Sourcepub fn draft_mut(&mut self) -> &mut S
pub fn draft_mut(&mut self) -> &mut S
Mutably borrows the independently advanceable proposal state.
Sourcepub const fn checkpoint(&self) -> &S
pub const fn checkpoint(&self) -> &S
Borrows the exact state from before proposal and verification.
Sourcepub fn commit_draft(self, canonical: &mut S)
pub fn commit_draft(self, canonical: &mut S)
Commits the advanced draft fork into canonical state.
Sourcepub fn rollback(self, canonical: &mut S)
pub fn rollback(self, canonical: &mut S)
Restores canonical state after rejection, cancellation, or failed verification.
Sourcepub fn commit_verified(self)
pub fn commit_verified(self)
Keeps target state already advanced by successful verification while consuming the unused fork and checkpoint.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for DraftStateTransaction<S>where
S: Freeze,
impl<S> RefUnwindSafe for DraftStateTransaction<S>where
S: RefUnwindSafe,
impl<S> Send for DraftStateTransaction<S>where
S: Send,
impl<S> Sync for DraftStateTransaction<S>where
S: Sync,
impl<S> Unpin for DraftStateTransaction<S>where
S: Unpin,
impl<S> UnsafeUnpin for DraftStateTransaction<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for DraftStateTransaction<S>where
S: 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