Enum bitcoin_units::amount::ParseAmountError
source · #[non_exhaustive]pub enum ParseAmountError {
OutOfRange(OutOfRangeError),
TooPrecise(TooPreciseError),
MissingDigits(MissingDigitsError),
InputTooLarge(InputTooLargeError),
InvalidCharacter(InvalidCharacterError),
}
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.
OutOfRange(OutOfRangeError)
The amount is too big or too small.
TooPrecise(TooPreciseError)
Amount has higher precision than supported by the type.
MissingDigits(MissingDigitsError)
A digit was expected but not found.
InputTooLarge(InputTooLargeError)
Input string was too large.
InvalidCharacter(InvalidCharacterError)
Invalid character in input.
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
Available on crate feature std
only.
impl Error for ParseAmountError
Available on crate feature
std
only.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 From<Infallible> for ParseAmountError
impl From<Infallible> for ParseAmountError
source§fn from(never: Infallible) -> Self
fn from(never: Infallible) -> Self
Converts to this type from the input type.
source§impl From<InputTooLargeError> for ParseAmountError
impl From<InputTooLargeError> for ParseAmountError
source§fn from(value: InputTooLargeError) -> Self
fn from(value: InputTooLargeError) -> Self
Converts to this type from the input type.
source§impl From<InvalidCharacterError> for ParseAmountError
impl From<InvalidCharacterError> for ParseAmountError
source§fn from(value: InvalidCharacterError) -> Self
fn from(value: InvalidCharacterError) -> Self
Converts to this type from the input type.
source§impl From<MissingDigitsError> for ParseAmountError
impl From<MissingDigitsError> for ParseAmountError
source§fn from(value: MissingDigitsError) -> Self
fn from(value: MissingDigitsError) -> Self
Converts to this type from the input type.
source§impl From<OutOfRangeError> for ParseAmountError
impl From<OutOfRangeError> for ParseAmountError
source§fn from(value: OutOfRangeError) -> Self
fn from(value: OutOfRangeError) -> Self
Converts to this type from the input type.
source§impl From<ParseAmountError> for ParseError
impl From<ParseAmountError> for ParseError
source§fn from(e: ParseAmountError) -> Self
fn from(e: ParseAmountError) -> Self
Converts to this type from the input type.
source§impl From<TooPreciseError> for ParseAmountError
impl From<TooPreciseError> for ParseAmountError
source§fn from(value: TooPreciseError) -> Self
fn from(value: TooPreciseError) -> Self
Converts to this type from the input type.
source§impl PartialEq for ParseAmountError
impl PartialEq 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 StructuralPartialEq for ParseAmountError
Auto Trait Implementations§
impl Freeze for ParseAmountError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)