Enum savefile::SavefileError [−][src]
#[must_use] #[non_exhaustive] pub enum SavefileError { IncompatibleSchema { message: String, }, IOError { io_error: Error, }, InvalidUtf8 { msg: String, }, MemoryAllocationLayoutError, ArrayvecCapacityError { msg: String, }, ShortRead, CryptographyError, SizeOverflow, WrongVersion { msg: String, }, GeneralError { msg: String, }, PoisonedMutex, }
Expand description
This object represents an error in deserializing or serializing an item.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Error given when the schema stored in a file, does not match the schema given by the data structures in the code, taking into account versions.
Show fields
Fields of IncompatibleSchema
message: String
A short description of the incompatibility
Some sort of IO failure. Permissions, broken media etc …
Show fields
Fields of IOError
io_error: Error
Cause
The binary data which is being deserialized, contained an invalid utf8 sequence where a String was expected. If this occurs, it is either a bug in savefile, a bug in an implementation of Deserialize, Serialize or WithSchema, or a corrupt data file.
Show fields
Fields of InvalidUtf8
msg: String
descriptive message
Unexpected error with regards to memory layout requirements.
An Arrayvec had smaller capacity than the size of the data in the binary file.
Show fields
Fields of ArrayvecCapacityError
msg: String
Descriptive message
The reader returned fewer bytes than expected
Cryptographic checksum mismatch. Probably due to a corrupt file.
A persisted value of isize or usize was greater than the maximum for the machine. This can happen if a file saved by a 64-bit machine contains an usize or isize which does not fit in a 32 bit word.
The file does not have a supported version number
Show fields
Fields of WrongVersion
msg: String
Descriptive message
The file does not have a supported version number
Show fields
Fields of GeneralError
msg: String
Descriptive message
A poisoned mutex was encountered when traversing the object being saved
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for SavefileError
impl Send for SavefileError
impl Sync for SavefileError
impl Unpin for SavefileError
impl !UnwindSafe for SavefileError