pub enum ConversionError {
InvalidType(SaveFileValue, &'static str),
ParseIntError(ParseIntError),
ParseFloatError(ParseFloatError),
ParseBoolError(ParseBoolError),
DateError(),
}
Expand description
An error that can occur when converting a value from a save file.
Variants§
InvalidType(SaveFileValue, &'static str)
The value is not of the expected type.
ParseIntError(ParseIntError)
ParseFloatError(ParseFloatError)
ParseBoolError(ParseBoolError)
DateError()
Trait Implementations§
Source§impl Debug for ConversionError
impl Debug for ConversionError
Source§impl Display for ConversionError
impl Display for ConversionError
Source§impl Error for ConversionError
impl Error for ConversionError
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<(SaveFileValue, &'static str)> for ConversionError
impl From<(SaveFileValue, &'static str)> for ConversionError
Source§fn from(value: (SaveFileValue, &'static str)) -> Self
fn from(value: (SaveFileValue, &'static str)) -> Self
Converts to this type from the input type.
Source§impl From<ConversionError> for ParsingError
impl From<ConversionError> for ParsingError
Source§fn from(value: ConversionError) -> Self
fn from(value: ConversionError) -> Self
Converts to this type from the input type.
Source§impl From<ConversionError> for SaveObjectError
impl From<ConversionError> for SaveObjectError
Source§fn from(value: ConversionError) -> Self
fn from(value: ConversionError) -> Self
Converts to this type from the input type.
Source§impl From<ConversionError> for SectionError
impl From<ConversionError> for SectionError
Source§fn from(value: ConversionError) -> Self
fn from(value: ConversionError) -> Self
Converts to this type from the input type.
Source§impl From<ParseBoolError> for ConversionError
impl From<ParseBoolError> for ConversionError
Source§fn from(value: ParseBoolError) -> Self
fn from(value: ParseBoolError) -> Self
Converts to this type from the input type.
Source§impl From<ParseFloatError> for ConversionError
impl From<ParseFloatError> for ConversionError
Source§fn from(value: ParseFloatError) -> Self
fn from(value: ParseFloatError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for ConversionError
impl From<ParseIntError> for ConversionError
Source§fn from(value: ParseIntError) -> Self
fn from(value: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConversionError
impl RefUnwindSafe for ConversionError
impl !Send for ConversionError
impl !Sync for ConversionError
impl Unpin for ConversionError
impl UnwindSafe for ConversionError
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