#[non_exhaustive]pub enum AionError {
Show 36 variants
FileReadError {
path: PathBuf,
source: Error,
},
FileWriteError {
path: PathBuf,
source: Error,
},
FileExists {
path: PathBuf,
},
FileNotFound {
path: PathBuf,
},
PermissionDenied {
path: PathBuf,
},
InvalidFormat {
reason: String,
},
CorruptedFile {
expected: String,
actual: String,
},
UnsupportedVersion {
version: u16,
supported: String,
},
InvalidHeader {
reason: String,
},
SignatureVerificationFailed {
version: u64,
author: AuthorId,
},
InvalidSignature {
reason: String,
},
UnauthorizedSigner {
author: AuthorId,
version: u64,
},
KeyMismatch {
author: AuthorId,
epoch: u32,
},
DecryptionFailed {
reason: String,
},
EncryptionFailed {
reason: String,
},
HashMismatch {
expected: [u8; 32],
actual: [u8; 32],
},
InvalidPrivateKey {
reason: String,
},
InvalidPublicKey {
reason: String,
},
BrokenVersionChain {
version: u64,
},
InvalidVersionNumber {
version: u64,
current: u64,
},
VersionOverflow {
max: u64,
},
MissingVersion {
version: u64,
},
KeyNotFound {
author_id: AuthorId,
reason: String,
},
KeyringAccessDenied {
reason: String,
},
KeyStoreFailed {
reason: String,
},
KeyringError {
operation: String,
reason: String,
},
InvalidFileId {
file_id: u64,
},
InvalidAuthorId {
author_id: u64,
},
InvalidTimestamp {
reason: String,
},
InvalidActionCode {
code: u16,
},
BrokenAuditChain {
expected: [u8; 32],
actual: [u8; 32],
},
InvalidUtf8 {
reason: String,
},
RulesTooLarge {
size: usize,
max: usize,
},
OperationNotPermitted {
operation: String,
required: String,
},
Conflict {
reason: String,
},
ResourceExhausted {
resource: String,
},
}Expand description
Top-level error type for AION v2
All errors provide contextual information to aid debugging and suggest solutions to users. Errors are organized by category for clarity.
#[non_exhaustive] because the crate is under active development —
new error categories will land for crypto rotations, hardware
attestation, transparency-log proofs, and additional compliance
frameworks. Adding a variant should not force every downstream
consumer’s exhaustive match to update on a minor release.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FileReadError
Failed to read a file
FileWriteError
Failed to write a file
FileExists
File already exists
FileNotFound
File not found
PermissionDenied
Permission denied
InvalidFormat
Invalid file format
CorruptedFile
Corrupted file detected via checksum mismatch
UnsupportedVersion
Unsupported file version
InvalidHeader
Invalid file header
SignatureVerificationFailed
Signature verification failed
InvalidSignature
Invalid signature
A commit was attempted by a signer the registry has no active epoch for at the target version (issue #25). The write was refused before any bytes were emitted.
Fields
The author that attempted to sign.
The version number the commit would have produced.
KeyMismatch
The supplied signing key’s public half does not match the operational key pinned in the registry for this author’s active epoch (issue #25). Most often means the caller used a rotated- out key.
Fields
The author that attempted to sign.
DecryptionFailed
Decryption failed
EncryptionFailed
Encryption failed
HashMismatch
Hash mismatch after decryption
InvalidPrivateKey
Invalid private key
InvalidPublicKey
Invalid public key
BrokenVersionChain
Version chain integrity broken
InvalidVersionNumber
Invalid version number
VersionOverflow
Version number overflow
MissingVersion
Missing version in chain
KeyNotFound
Key not found in keyring
KeyringAccessDenied
Keyring access denied
KeyStoreFailed
Failed to store key
KeyringError
Keyring operation error
InvalidFileId
Invalid file ID
InvalidAuthorId
Invalid author ID
Fields
Invalid author ID value
InvalidTimestamp
Invalid timestamp
InvalidActionCode
Invalid action code
BrokenAuditChain
Broken audit chain
InvalidUtf8
Invalid UTF-8 encoding
RulesTooLarge
Rules too large
OperationNotPermitted
Operation not permitted
Conflict
Conflicting operation
ResourceExhausted
Resource exhausted
Trait Implementations§
Source§impl Error for AionError
impl Error for AionError
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
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AionError
impl !RefUnwindSafe for AionError
impl Send for AionError
impl Sync for AionError
impl Unpin for AionError
impl UnsafeUnpin for AionError
impl !UnwindSafe for AionError
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
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>
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