pub enum DeltaApplyResult {
Success {
applied_count: usize,
new_root_hash: [u8; 32],
},
MissingParents {
missing_parent_deltas: Vec<[u8; 32]>,
applied_before_failure: usize,
},
Failed {
reason: String,
},
}Expand description
Result of attempting to apply deltas.
Note: This is a local-only type used to report the outcome of delta application. It is not transmitted over the wire (hence no Borsh traits).
Variants§
Success
All deltas applied successfully.
Fields
MissingParents
Some deltas could not be applied due to missing parents. Suggests escalation to state-based sync.
Fields
Failed
Delta application failed (hash mismatch, corruption, etc.).
Implementations§
Source§impl DeltaApplyResult
impl DeltaApplyResult
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if delta application was fully successful.
Sourcepub fn needs_state_sync(&self) -> bool
pub fn needs_state_sync(&self) -> bool
Check if escalation to state-based sync is needed.
Trait Implementations§
Source§impl Clone for DeltaApplyResult
impl Clone for DeltaApplyResult
Source§fn clone(&self) -> DeltaApplyResult
fn clone(&self) -> DeltaApplyResult
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 moreAuto Trait Implementations§
impl Freeze for DeltaApplyResult
impl RefUnwindSafe for DeltaApplyResult
impl Send for DeltaApplyResult
impl Sync for DeltaApplyResult
impl Unpin for DeltaApplyResult
impl UnsafeUnpin for DeltaApplyResult
impl UnwindSafe for DeltaApplyResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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