pub enum SaveFileError {
IoError(Error),
ParseError(&'static str),
DecompressionError(ZipError),
DecodingError(FromUtf8Error),
}
Expand description
An error that can occur when opening a save file. Generally things that are the fault of the user, however unintentional those may be
Variants§
IoError(Error)
Something went wrong with stdlib IO.
ParseError(&'static str)
We found a problem
DecompressionError(ZipError)
Something went wrong with decompressing the save file.
DecodingError(FromUtf8Error)
Decoding bytes failed
Trait Implementations§
Source§impl Debug for SaveFileError
impl Debug for SaveFileError
Source§impl Display for SaveFileError
impl Display for SaveFileError
Source§impl Error for SaveFileError
impl Error for SaveFileError
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<&'static str> for SaveFileError
impl From<&'static str> for SaveFileError
Source§impl From<Error> for SaveFileError
impl From<Error> for SaveFileError
Source§impl From<FromUtf8Error> for SaveFileError
impl From<FromUtf8Error> for SaveFileError
Source§fn from(value: FromUtf8Error) -> Self
fn from(value: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<SaveFileError> for GameDataError
impl From<SaveFileError> for GameDataError
Source§fn from(value: SaveFileError) -> Self
fn from(value: SaveFileError) -> Self
Converts to this type from the input type.
Source§impl From<SaveFileError> for UserError
impl From<SaveFileError> for UserError
Source§fn from(value: SaveFileError) -> Self
fn from(value: SaveFileError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SaveFileError
impl !RefUnwindSafe for SaveFileError
impl Send for SaveFileError
impl Sync for SaveFileError
impl Unpin for SaveFileError
impl !UnwindSafe for SaveFileError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more