#[non_exhaustive]pub enum ValidationError {
InvalidSaid {
expected: Said,
actual: Said,
},
BrokenChain {
sequence: u64,
referenced: Said,
actual: Said,
},
InvalidSequence {
expected: u64,
actual: u64,
},
CommitmentMismatch {
sequence: u64,
},
SignatureFailed {
sequence: u64,
},
NotInception,
EmptyKel,
MultipleInceptions,
Serialization(String),
MalformedSequence {
raw: String,
},
}Expand description
Errors specific to KEL validation.
These errors represent protocol invariant violations. They indicate structural corruption or attack, not recoverable conditions.
§Invariants Enforced
- Append-only KEL: Sequence numbers must be monotonically increasing
- Self-addressing: Each event’s SAID must match its content hash
- Chain integrity: Each event must reference the previous event’s SAID
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.
InvalidSaid
SAID (Self-Addressing Identifier) doesn’t match content hash.
This is a protocol invariant violation. The event’s d field
must equal the Blake3 hash of its canonical serialization.
BrokenChain
Event references wrong previous event.
This is a chain integrity violation. Each event’s p field
must equal the SAID of the immediately preceding event.
InvalidSequence
Sequence number is not monotonically increasing.
This is an append-only invariant violation. Sequence numbers must be 0, 1, 2, … with no gaps or duplicates.
CommitmentMismatch
SignatureFailed
NotInception
EmptyKel
MultipleInceptions
Serialization(String)
MalformedSequence
Trait Implementations§
Source§impl AuthsErrorInfo for ValidationError
impl AuthsErrorInfo for ValidationError
Source§fn error_code(&self) -> &'static str
fn error_code(&self) -> &'static str
Returns a unique error code string for this error variant.
Source§fn suggestion(&self) -> Option<&'static str>
fn suggestion(&self) -> Option<&'static str>
Returns an optional actionable suggestion for resolving the error.
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
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 ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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 From<ValidationError> for AnchorError
impl From<ValidationError> for AnchorError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for InceptionError
impl From<ValidationError> for InceptionError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for KelError
impl From<ValidationError> for KelError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for ResolveError
impl From<ValidationError> for ResolveError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for RotationError
impl From<ValidationError> for RotationError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ValidationError
impl PartialEq for ValidationError
impl Eq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.