pub enum SerializationError {
Io(Error),
Json(Error),
Binary(Error),
Ron(Error),
Utf8(FromUtf8Error),
SaveNotFound(String),
MetadataNotFound(String),
InvalidCompressionFormat,
CorruptedData,
IncompatibleVersion {
found: SaveVersion,
expected: SaveVersion,
},
}Expand description
Errors that can occur during serialization operations.
Variants§
Io(Error)
IO error occurred
Json(Error)
JSON serialization error
Binary(Error)
Binary serialization error
Ron(Error)
RON serialization error
Utf8(FromUtf8Error)
UTF-8 conversion error
SaveNotFound(String)
Save file not found
MetadataNotFound(String)
Metadata file not found
InvalidCompressionFormat
Invalid compression format
CorruptedData
Corrupted save data
IncompatibleVersion
Version incompatibility
Trait Implementations§
Source§impl Debug for SerializationError
impl Debug for SerializationError
Source§impl Display for SerializationError
impl Display for SerializationError
Source§impl Error for SerializationError
impl Error for SerializationError
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 From<Error> for SerializationError
impl From<Error> for SerializationError
Source§impl From<Error> for SerializationError
impl From<Error> for SerializationError
Source§impl From<Error> for SerializationError
impl From<Error> for SerializationError
Source§impl From<FromUtf8Error> for SerializationError
impl From<FromUtf8Error> for SerializationError
Source§fn from(error: FromUtf8Error) -> Self
fn from(error: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SerializationError
impl !UnwindSafe for SerializationError
impl Freeze for SerializationError
impl Send for SerializationError
impl Sync for SerializationError
impl Unpin for SerializationError
impl UnsafeUnpin for SerializationError
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