#[non_exhaustive]pub enum MapperError {
WrongLength {
expected: usize,
got: usize,
},
UnsupportedVersion(u8),
Invalid(String),
}Expand description
Errors produced by mapper save-state load.
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.
WrongLength
Save-state blob is not the length this mapper’s state has: shorter
or longer. (Until v2.9.9 the message said “truncated” for a long blob
too; NC-14. Until v3.0.0 the variant itself was named Truncated,
which said the opposite of half its uses; T-API-EXTENSIBLE.)
UnsupportedVersion(u8)
Save-state blob carries an unknown version tag.
Invalid(String)
Save-state blob would put the mapper into an inconsistent state.
Trait Implementations§
Source§impl Debug for MapperError
impl Debug for MapperError
Source§impl Display for MapperError
impl Display for MapperError
Source§impl Error for MapperError
impl Error for MapperError
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()
Auto Trait Implementations§
impl Freeze for MapperError
impl RefUnwindSafe for MapperError
impl Send for MapperError
impl Sync for MapperError
impl Unpin for MapperError
impl UnsafeUnpin for MapperError
impl UnwindSafe for MapperError
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