pub enum MagnetError {
LoadError(Error),
ParseFloatError(ParseFloatError),
TomlParseError(Error),
ParseError(Error),
PolygonSideError(),
Other(Error),
}Expand description
Error Enum for possible errors
Variants§
LoadError(Error)
Can’t open file
ParseFloatError(ParseFloatError)
When parsing floats fail
TomlParseError(Error)
Can’t parse TOML struct
ParseError(Error)
SERDE error when unable to parse json struct/file
PolygonSideError()
Polygon side error
Other(Error)
Any other error
Trait Implementations§
Source§impl Debug for MagnetError
impl Debug for MagnetError
Source§impl Display for MagnetError
impl Display for MagnetError
Source§impl Error for MagnetError
impl Error for MagnetError
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<Error> for MagnetError
impl From<Error> for MagnetError
Source§impl From<Error> for MagnetError
impl From<Error> for MagnetError
Source§impl From<Error> for MagnetError
impl From<Error> for MagnetError
Source§impl From<Error> for MagnetError
impl From<Error> for MagnetError
Source§impl From<ParseFloatError> for MagnetError
impl From<ParseFloatError> for MagnetError
Source§fn from(e: ParseFloatError) -> Self
fn from(e: ParseFloatError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MagnetError
impl !RefUnwindSafe for MagnetError
impl Send for MagnetError
impl Sync for MagnetError
impl Unpin for MagnetError
impl !UnwindSafe for MagnetError
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