#[non_exhaustive]pub enum ApplyStreamError {
EmptyBatch {
batch_index: usize,
},
CommitmentCheckpointMismatch {
batch_index: usize,
commitment_index: usize,
batch_checkpoint_seq: u64,
commitment_checkpoint_seq: u64,
},
NonMonotonicCheckpoint {
batch_index: usize,
previous_checkpoint_seq: u64,
batch_checkpoint_seq: u64,
},
}Available on crate feature
unstable only.Expand description
Reasons apply_stream_updates can reject a batch.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EmptyBatch
A batch contained no commitments. The framework never folds an empty batch into the MMR, so a verifier should not produce one.
CommitmentCheckpointMismatch
A commitment’s checkpoint_seq field disagreed with the enclosing
batch’s checkpoint_seq. A batch corresponds to a single settlement
transaction; all of its commitments share the settlement’s
checkpoint.
Fields
NonMonotonicCheckpoint
A batch’s checkpoint_seq was strictly less than the head’s last
folded checkpoint. Batches must be applied in monotonic order.
Trait Implementations§
Source§impl Clone for ApplyStreamError
impl Clone for ApplyStreamError
Source§fn clone(&self) -> ApplyStreamError
fn clone(&self) -> ApplyStreamError
Returns a duplicate of the value. Read more
1.0.0 · 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 ApplyStreamError
impl Debug for ApplyStreamError
Source§impl Display for ApplyStreamError
impl Display for ApplyStreamError
Source§impl Error for ApplyStreamError
impl Error for ApplyStreamError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for ApplyStreamError
impl PartialEq for ApplyStreamError
impl Eq for ApplyStreamError
impl StructuralPartialEq for ApplyStreamError
Auto Trait Implementations§
impl Freeze for ApplyStreamError
impl RefUnwindSafe for ApplyStreamError
impl Send for ApplyStreamError
impl Sync for ApplyStreamError
impl Unpin for ApplyStreamError
impl UnsafeUnpin for ApplyStreamError
impl UnwindSafe for ApplyStreamError
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more