[−][src]Enum savefile::SavefileError
This object represents an error in deserializing or serializing an item.
Variants (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.
Fields of IncompatibleSchema
message: String
A short description of the incompatibility
Some sort of IO failure. Permissions, broken media etc ...
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.
Fields of InvalidUtf8
msg: String
descriptive message
Savefile failed to allocate enough memory. Either you have too little memory, or the file is corrupt somehow.
Fields of OutOfMemory
err: AllocErr
Cause
Unexpected error with regards to memory layout requirements.
An Arrayvec had smaller capacity than the size of the data in the binary file.
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
Fields of WrongVersion
msg: String
Descriptive message
The file does not have a supported version number
Fields of GeneralError
msg: String
Descriptive message
Trait Implementations
impl Debug for SavefileError
[src]
impl Display for SavefileError
[src]
impl Fail for SavefileError
[src]
fn name(&self) -> Option<&str>
[src]
fn cause(&self) -> Option<&dyn Fail>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
[src]
D: Display + Send + Sync + 'static,
fn compat(self) -> Compat<Self>
[src]
impl From<AllocErr> for SavefileError
[src]
fn from(s: AllocErr) -> SavefileError
[src]
impl<T> From<CapacityError<T>> for SavefileError
[src]
fn from(s: CapacityError<T>) -> SavefileError
[src]
impl From<Error> for SavefileError
[src]
fn from(s: Error) -> SavefileError
[src]
impl From<FromUtf8Error> for SavefileError
[src]
fn from(s: FromUtf8Error) -> SavefileError
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SavefileError
impl Send for SavefileError
impl Sync for SavefileError
impl Unpin for SavefileError
impl !UnwindSafe for SavefileError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsFail for T where
T: Fail,
[src]
T: Fail,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
[src]
E: 'static + Error + Send + Sync,
fn name(&self) -> Option<&str>
[src]
fn cause(&self) -> Option<&(dyn Fail + 'static)>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
[src]
D: Display + Send + Sync + 'static,
fn compat(self) -> Compat<Self>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,