#[non_exhaustive]pub enum AuthError {
Show 24 variants
KeyNotFound {
key_name: String,
},
InvalidKeyFormat {
reason: String,
},
KeyParsingFailed {
reason: String,
},
NoAuthConfiguration,
InvalidAuthConfiguration {
reason: String,
},
EmptyDelegationPath,
DelegationDepthExceeded {
depth: usize,
},
InvalidDelegationStep {
reason: String,
},
DelegatedTreeLoadFailed {
tree_id: String,
source: Box<Error>,
},
InvalidDelegationTips {
tree_id: String,
claimed_tips: Vec<ID>,
},
DelegationNotFound {
tree_id: String,
},
CannotRevokeNonKey {
key_name: String,
},
MalformedEntry {
reason: &'static str,
},
InvalidSignature,
SignatureVerificationFailed {
reason: String,
},
DatabaseRequired {
operation: String,
},
InvalidPermissionString {
value: String,
},
PermissionRequiresPriority {
permission_type: String,
},
InvalidPriorityValue {
value: String,
},
InvalidKeyStatus {
value: String,
},
PermissionDenied {
reason: String,
},
KeyAlreadyExists {
key_name: String,
},
KeyNameConflict {
key_name: String,
existing_pubkey: String,
new_pubkey: String,
},
SigningKeyMismatch {
reason: String,
},
}Expand description
Errors that can occur during authentication operations.
§Stability
- New variants may be added in minor versions (enum is
#[non_exhaustive]) - Existing variants will not be removed in minor versions
- Field additions/changes require a major version bump
- Helper methods like
is_*()provide stable APIs
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
KeyNotFound
A requested authentication key was not found in the configuration.
InvalidKeyFormat
Invalid key format or parsing error.
KeyParsingFailed
Key parsing failed due to cryptographic library error.
NoAuthConfiguration
No authentication configuration was found.
InvalidAuthConfiguration
The authentication configuration is invalid.
EmptyDelegationPath
Delegation path is empty when it should contain at least one step.
DelegationDepthExceeded
Maximum delegation depth was exceeded to prevent infinite loops.
InvalidDelegationStep
A delegation step is invalid.
DelegatedTreeLoadFailed
Failed to load a delegated tree.
Fields
InvalidDelegationTips
Delegation tips don’t match the actual tree state.
Fields
DelegationNotFound
A delegated tree reference was not found in the configuration.
CannotRevokeNonKey
Attempted to revoke an entry that is not a key.
MalformedEntry
Entry has malformed signature info (e.g., hint without signature).
InvalidSignature
Signature verification failed.
SignatureVerificationFailed
Signature verification failed with specific error.
DatabaseRequired
Database is required for the operation but not available.
InvalidPermissionString
Invalid permission string format.
PermissionRequiresPriority
Permission type requires a priority value.
InvalidPriorityValue
Invalid priority value.
InvalidKeyStatus
Invalid key status string.
PermissionDenied
Permission denied for an operation.
KeyAlreadyExists
Attempted to add a key that already exists.
KeyNameConflict
Key name conflicts with existing key that has different public key.
Fields
SigningKeyMismatch
Signing key does not match the claimed identity in a DatabaseKey.
Implementations§
Source§impl AuthError
impl AuthError
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Check if this error indicates a key or delegation was not found.
Sourcepub fn is_invalid_signature(&self) -> bool
pub fn is_invalid_signature(&self) -> bool
Check if this error indicates invalid signature.
Sourcepub fn is_permission_denied(&self) -> bool
pub fn is_permission_denied(&self) -> bool
Check if this error indicates permission was denied.
Sourcepub fn is_key_already_exists(&self) -> bool
pub fn is_key_already_exists(&self) -> bool
Check if this error indicates a key already exists.
Sourcepub fn is_key_name_conflict(&self) -> bool
pub fn is_key_name_conflict(&self) -> bool
Check if this error indicates a key name conflict.
Sourcepub fn is_configuration_error(&self) -> bool
pub fn is_configuration_error(&self) -> bool
Check if this error indicates a configuration problem.
Sourcepub fn is_delegation_error(&self) -> bool
pub fn is_delegation_error(&self) -> bool
Check if this error is related to delegation.
Trait Implementations§
Source§impl Error for AuthError
impl Error for AuthError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for AuthError
impl !RefUnwindSafe for AuthError
impl Send for AuthError
impl Sync for AuthError
impl Unpin for AuthError
impl !UnwindSafe for AuthError
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.