#[non_exhaustive]pub enum KyaError {
Show 25 variants
EmptyChain,
StorageFailure(KyaStorageError),
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),
}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(KyaStorageError)
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)
Implementations§
Source§impl KyaError
impl KyaError
pub fn as_storage_error(&self) -> Option<&KyaStorageError>
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 KyaError
impl Error for KyaError
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 KyaError
impl StructuralPartialEq for KyaError
Auto Trait Implementations§
impl Freeze for KyaError
impl RefUnwindSafe for KyaError
impl Send for KyaError
impl Sync for KyaError
impl Unpin for KyaError
impl UnsafeUnpin for KyaError
impl UnwindSafe for KyaError
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.