#[non_exhaustive]pub enum IntFromSExprError {
NotAnAtom,
ParseIntError(ParseIntError),
}
Expand description
An error which can be returned when trying to interpret an s-expr as an integer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotAnAtom
The s-expr is a list, not an atom, and therefore cannot be converted to an integer.
ParseIntError(ParseIntError)
There was an error parsing the atom as an integer.
Trait Implementations§
Source§impl Debug for IntFromSExprError
impl Debug for IntFromSExprError
Source§impl Display for IntFromSExprError
impl Display for IntFromSExprError
Source§impl Error for IntFromSExprError
impl Error for IntFromSExprError
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<ParseIntError> for IntFromSExprError
impl From<ParseIntError> for IntFromSExprError
Source§fn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IntFromSExprError
impl RefUnwindSafe for IntFromSExprError
impl Send for IntFromSExprError
impl Sync for IntFromSExprError
impl Unpin for IntFromSExprError
impl UnwindSafe for IntFromSExprError
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