pub enum PreferencesError {
Json(Error),
Io(Error),
Directory,
}
Expand description
Error type representing the errors that can occur when saving or loading user data.
Variants§
Json(Error)
An error occurred during JSON serialization or deserialization.
Io(Error)
An error occurred during preferences file I/O.
Directory
Couldn’t figure out where to put or find the serialized data.
Trait Implementations§
source§impl Debug for PreferencesError
impl Debug for PreferencesError
source§impl Display for PreferencesError
impl Display for PreferencesError
source§impl Error for PreferencesError
impl Error for PreferencesError
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl From<Error> for PreferencesError
impl From<Error> for PreferencesError
source§impl From<Error> for PreferencesError
impl From<Error> for PreferencesError
source§impl From<FromUtf8Error> for PreferencesError
impl From<FromUtf8Error> for PreferencesError
source§fn from(_: FromUtf8Error) -> Self
fn from(_: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PreferencesError
impl !RefUnwindSafe for PreferencesError
impl Send for PreferencesError
impl Sync for PreferencesError
impl Unpin for PreferencesError
impl !UnwindSafe for PreferencesError
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