#[non_exhaustive]pub enum A1Error {
Show 31 variants
EmptyChain,
StorageFailure(A1StorageError),
RootMismatch,
BrokenLinkage(usize),
InvalidSignature(usize),
NotYetValid(usize, u64, u64),
Expired(usize, u64, u64),
TemporalViolation(usize, u64, u64),
MaxDepthExceeded(usize, u8),
InvalidSubScopeProof,
ScopeEscalation(usize),
UnauthorizedLeaf,
ScopeViolation,
NonceReplay,
Revoked,
IntentNotFound,
EmptyTree,
WireFormatError(String),
UnsupportedVersion {
expected: u8,
got: u8,
},
PolicyViolation(String),
BatchItemFailed {
index: usize,
reason: String,
},
MacVerificationFailed,
NamespaceMismatch {
chain: String,
requested: String,
},
RateLimitExceeded,
StorageUnhealthy(String),
PassportNarrowingViolation,
UnsupportedAlgorithm(u8),
AlgorithmMismatch {
expected: &'static str,
found: &'static str,
},
HybridSignatureInvalid {
component: &'static str,
},
PqSignatureMissing(&'static str),
InvalidHybridKeyLength {
algorithm: &'static str,
expected: usize,
found: usize,
},
}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.
EmptyChain
StorageFailure(A1StorageError)
RootMismatch
BrokenLinkage(usize)
InvalidSignature(usize)
NotYetValid(usize, u64, u64)
Expired(usize, u64, u64)
TemporalViolation(usize, u64, u64)
MaxDepthExceeded(usize, u8)
InvalidSubScopeProof
ScopeEscalation(usize)
ScopeViolation
NonceReplay
Revoked
IntentNotFound
EmptyTree
WireFormatError(String)
UnsupportedVersion
PolicyViolation(String)
BatchItemFailed
MacVerificationFailed
NamespaceMismatch
RateLimitExceeded
StorageUnhealthy(String)
PassportNarrowingViolation
UnsupportedAlgorithm(u8)
AlgorithmMismatch
HybridSignatureInvalid
PqSignatureMissing(&'static str)
InvalidHybridKeyLength
Implementations§
Source§impl A1Error
impl A1Error
pub fn as_storage_error(&self) -> Option<&A1StorageError>
pub fn is_transient_storage_failure(&self) -> bool
pub fn error_code(&self) -> &'static str
pub fn http_status(&self) -> u16
Trait Implementations§
Source§impl Error for A1Error
impl Error for A1Error
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()
impl Eq for A1Error
impl StructuralPartialEq for A1Error
Auto Trait Implementations§
impl Freeze for A1Error
impl RefUnwindSafe for A1Error
impl Send for A1Error
impl Sync for A1Error
impl Unpin for A1Error
impl UnsafeUnpin for A1Error
impl UnwindSafe for A1Error
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.