pub enum AprError {
Show 14 variants
InvalidMagic {
found: [u8; 4],
},
UnsupportedVersion {
version: u16,
min_supported: u16,
},
ChecksumMismatch {
expected: u32,
computed: u32,
},
ModelTooLarge {
size: usize,
max: usize,
},
FileTooSmall {
size: usize,
},
InvalidName {
name: String,
},
InvalidVersion {
version: String,
},
CborEncode(String),
CborDecode(String),
Compression(String),
Decompression(String),
UnknownBuiltin {
name: String,
},
MissingField {
field: &'static str,
},
Io(Error),
}Expand description
Errors that can occur when working with APR models
Variants§
InvalidMagic
Invalid magic number (not “APNR”)
UnsupportedVersion
Unsupported version
ChecksumMismatch
Checksum mismatch
ModelTooLarge
Model too large
FileTooSmall
File too small
InvalidName
Invalid metadata name
InvalidVersion
Invalid semver version
CborEncode(String)
CBOR encoding error
CborDecode(String)
CBOR decoding error
Compression(String)
Compression error
Decompression(String)
Decompression error
UnknownBuiltin
Unknown builtin model
MissingField
Missing required field in metadata
Io(Error)
I/O error
Implementations§
Trait Implementations§
Source§impl Error for AprError
impl Error for AprError
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()
Auto Trait Implementations§
impl Freeze for AprError
impl !RefUnwindSafe for AprError
impl Send for AprError
impl Sync for AprError
impl Unpin for AprError
impl !UnwindSafe for AprError
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