Enum digit_sequence::CrateError
source · pub enum CrateError {
NonDigitChar(char),
NonDigitNumber(u128),
NegativeNumber(i128),
Overflow,
}
Expand description
Custom error scenarios related to this crate.
Variants§
NonDigitChar(char)
When a character does not represent a 0-9 digit.
NonDigitNumber(u128)
When a number does not represent a 0-9 digit.
NegativeNumber(i128)
When trying conversion from a negative number.
Overflow
When an operation causes a numeric overflow.
Trait Implementations§
source§impl Clone for CrateError
impl Clone for CrateError
source§fn clone(&self) -> CrateError
fn clone(&self) -> CrateError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CrateError
impl Debug for CrateError
source§impl Display for CrateError
impl Display for CrateError
source§impl Error for CrateError
impl Error for CrateError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 Hash for CrateError
impl Hash for CrateError
source§impl Ord for CrateError
impl Ord for CrateError
source§fn cmp(&self, other: &CrateError) -> Ordering
fn cmp(&self, other: &CrateError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CrateError
impl PartialEq for CrateError
source§fn eq(&self, other: &CrateError) -> bool
fn eq(&self, other: &CrateError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CrateError
impl PartialOrd for CrateError
source§fn partial_cmp(&self, other: &CrateError) -> Option<Ordering>
fn partial_cmp(&self, other: &CrateError) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for CrateError
impl Eq for CrateError
impl StructuralPartialEq for CrateError
Auto Trait Implementations§
impl Freeze for CrateError
impl RefUnwindSafe for CrateError
impl Send for CrateError
impl Sync for CrateError
impl Unpin for CrateError
impl UnwindSafe for CrateError
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