pub enum CalcError {
NameNotFound(String),
NameAlreadyBound(String),
IncorrectArity(usize, usize),
ParseNum,
ParseError,
IOError,
Unknown,
}
Expand description
The error type returned when functions in this crate go wrong.
Variants§
NameNotFound(String)
Symbol is not in context.
NameAlreadyBound(String)
Use tried to assign a value to a name that already has a value assigned to it.
IncorrectArity(usize, usize)
Function called with incorrect number of arguments. IncorrectArity(expected, found)
.
ParseNum
There was an error when parsing a number.
ParseError
There was a parsing error.
IOError
An error with IO like stdin not working.
Unknown
Error in astro_float
.
Trait Implementations§
Source§impl Error for CalcError
impl Error for CalcError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for CalcError
impl RefUnwindSafe for CalcError
impl Send for CalcError
impl Sync for CalcError
impl Unpin for CalcError
impl UnwindSafe for CalcError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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