pub enum AmountParseError {
Overflow,
ExpectedDot,
ExpectedDigit,
ExpectedMore,
ExpectedDigitOrDot,
AtMostSixDecimals,
}
Expand description
An error indicating why parsing of an amount failed. Since amount parsing is typically a user-facing activity this is fairly precise, so we can notify the user why we failed, and what they can do to fix it.
Variants§
Trait Implementations§
source§impl Clone for AmountParseError
impl Clone for AmountParseError
source§fn clone(&self) -> AmountParseError
fn clone(&self) -> AmountParseError
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 AmountParseError
impl Debug for AmountParseError
source§impl Display for AmountParseError
impl Display for AmountParseError
source§impl Error for AmountParseError
impl Error for AmountParseError
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 PartialEq for AmountParseError
impl PartialEq for AmountParseError
source§fn eq(&self, other: &AmountParseError) -> bool
fn eq(&self, other: &AmountParseError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for AmountParseError
impl Eq for AmountParseError
impl StructuralPartialEq for AmountParseError
Auto Trait Implementations§
impl Freeze for AmountParseError
impl RefUnwindSafe for AmountParseError
impl Send for AmountParseError
impl Sync for AmountParseError
impl Unpin for AmountParseError
impl UnwindSafe for AmountParseError
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