#[non_exhaustive]pub enum Error {
AuthenticationFailed,
InvalidLength {
context: ErrorContext,
actual: usize,
constraint: LengthConstraint,
},
InvalidValue {
context: ErrorContext,
actual: u64,
constraint: ValueConstraint,
},
InvalidEncoding {
context: ErrorContext,
},
InvalidKey {
context: ErrorContext,
},
MissingData {
context: ErrorContext,
},
InvalidState {
context: ErrorContext,
},
ArithmeticOverflow {
context: ErrorContext,
},
AllocationFailed {
context: ErrorContext,
},
Io(Error),
}Expand description
Errors generated by Dryoc.
Variants are structured so callers can handle failures without parsing the human-readable message. Display text is not part of the API contract.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AuthenticationFailed
Authentication or signature verification failed.
InvalidLength
A byte string or buffer had an invalid length.
Fields
context: ErrorContextThe input or output whose length was invalid.
constraint: LengthConstraintThe required length constraint.
InvalidValue
A numeric parameter was outside its supported range.
Fields
context: ErrorContextThe parameter whose value was invalid.
constraint: ValueConstraintThe required value constraint.
InvalidEncoding
Encoded data was malformed or unsupported.
Fields
context: ErrorContextThe encoded field or format that was invalid.
InvalidKey
A cryptographic key was invalid or unsafe to use.
Fields
context: ErrorContextThe key whose value was invalid.
MissingData
Required data was absent.
Fields
context: ErrorContextThe missing field or value.
InvalidState
The requested operation was invalid for the current state.
Fields
context: ErrorContextThe state or operation that was invalid.
ArithmeticOverflow
An arithmetic operation overflowed.
Fields
context: ErrorContextThe value being calculated.
AllocationFailed
Memory required for an operation could not be allocated.
Fields
context: ErrorContextThe input or operation requiring the allocation.
Io(Error)
An operating-system I/O operation failed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()