Enum bitcoin::util::amount::ParseAmountError
source · #[non_exhaustive]pub enum ParseAmountError {
Negative,
TooBig,
TooPrecise,
InvalidFormat,
InputTooLarge,
InvalidCharacter(char),
UnknownDenomination(String),
PossiblyConfusingDenomination(String),
}
Expand description
An error during amount parsing.
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.
Negative
Amount is negative.
TooBig
Amount is too big to fit inside the type.
TooPrecise
Amount has higher precision than supported by the type.
InvalidFormat
Invalid number format.
InputTooLarge
Input string was too large.
InvalidCharacter(char)
Invalid character in input.
UnknownDenomination(String)
The denomination was unknown.
PossiblyConfusingDenomination(String)
The denomination has multiple possible interpretations.
Trait Implementations§
source§impl Clone for ParseAmountError
impl Clone for ParseAmountError
source§fn clone(&self) -> ParseAmountError
fn clone(&self) -> ParseAmountError
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 ParseAmountError
impl Debug for ParseAmountError
source§impl Display for ParseAmountError
impl Display for ParseAmountError
source§impl Error for ParseAmountError
impl Error for ParseAmountError
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<ParseAmountError> for ParseAmountError
impl PartialEq<ParseAmountError> for ParseAmountError
source§fn eq(&self, other: &ParseAmountError) -> bool
fn eq(&self, other: &ParseAmountError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ParseAmountError
impl StructuralEq for ParseAmountError
impl StructuralPartialEq for ParseAmountError
Auto Trait Implementations§
impl RefUnwindSafe for ParseAmountError
impl Send for ParseAmountError
impl Sync for ParseAmountError
impl Unpin for ParseAmountError
impl UnwindSafe for ParseAmountError
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