#[non_exhaustive]pub enum SnapshotError {
Format(u16),
Malformed,
Encode,
}Available on crate feature
unstable only.Expand description
Why a MapSnapshot does not encode or read.
§Examples
use enshwick::map::{MapSnapshot, SnapshotError};
assert_eq!(MapSnapshot::from_bytes(&[9, 0]), Err(SnapshotError::Format(9)));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.
Format(u16)
Written in another format than MAP_SNAPSHOT_FORMAT.
Malformed
Cut short or not a snapshot.
Encode
A value the encoding cannot hold.
Trait Implementations§
Source§impl Clone for SnapshotError
impl Clone for SnapshotError
impl Copy for SnapshotError
Source§impl Debug for SnapshotError
impl Debug for SnapshotError
Source§impl Display for SnapshotError
impl Display for SnapshotError
impl Eq for SnapshotError
Source§impl Error for SnapshotError
impl Error for SnapshotError
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()
Source§impl PartialEq for SnapshotError
impl PartialEq for SnapshotError
impl StructuralPartialEq for SnapshotError
Auto Trait Implementations§
impl Freeze for SnapshotError
impl RefUnwindSafe for SnapshotError
impl Send for SnapshotError
impl Sync for SnapshotError
impl Unpin for SnapshotError
impl UnsafeUnpin for SnapshotError
impl UnwindSafe for SnapshotError
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