pub struct VerificationBatch { /* private fields */ }Expand description
A small deterministic state machine; async orchestration owns no state rules.
Implementations§
Source§impl VerificationBatch
impl VerificationBatch
pub const fn planned(expected: u32) -> Self
Sourcepub fn start(&mut self) -> Result<(), VerificationTransitionError>
pub fn start(&mut self) -> Result<(), VerificationTransitionError>
Starts a planned batch, completing an empty batch immediately.
§Errors
Returns VerificationTransitionError::InvalidState unless planned.
Sourcepub fn record(
&mut self,
index: u32,
completion: Completion,
) -> Result<(), VerificationTransitionError>
pub fn record( &mut self, index: u32, completion: Completion, ) -> Result<(), VerificationTransitionError>
Records exactly one terminal result for an input position.
§Errors
Rejects invalid state, out-of-range indices, and duplicate completion.
Sourcepub fn cancel(&mut self) -> Result<(), VerificationTransitionError>
pub fn cancel(&mut self) -> Result<(), VerificationTransitionError>
Sourcepub fn expire(&mut self) -> Result<(), VerificationTransitionError>
pub fn expire(&mut self) -> Result<(), VerificationTransitionError>
Expires a running batch at its external deadline.
§Errors
Returns VerificationTransitionError::InvalidState unless running.
pub const fn state(&self) -> BatchState
pub const fn expected(&self) -> u32
pub fn completed(&self) -> u32
pub fn succeeded_indices(&self) -> &BTreeSet<u32>
pub fn failed_indices(&self) -> &BTreeSet<u32>
Trait Implementations§
Source§impl Clone for VerificationBatch
impl Clone for VerificationBatch
Source§fn clone(&self) -> VerificationBatch
fn clone(&self) -> VerificationBatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VerificationBatch
impl Debug for VerificationBatch
Source§impl<'de> Deserialize<'de> for VerificationBatch
impl<'de> Deserialize<'de> for VerificationBatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for VerificationBatch
Source§impl PartialEq for VerificationBatch
impl PartialEq for VerificationBatch
Source§impl Serialize for VerificationBatch
impl Serialize for VerificationBatch
impl StructuralPartialEq for VerificationBatch
Auto Trait Implementations§
impl Freeze for VerificationBatch
impl RefUnwindSafe for VerificationBatch
impl Send for VerificationBatch
impl Sync for VerificationBatch
impl Unpin for VerificationBatch
impl UnsafeUnpin for VerificationBatch
impl UnwindSafe for VerificationBatch
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