Module amount

Source
Expand description

Bitcoin amounts.

This module mainly introduces the Amount and SignedAmount types. We refer to the documentation on the types for more information.

Modules§

serdeserde
This module adds serde serialization and deserialization support for Amounts.

Structs§

Amount
An amount.
Display
A helper/builder that displays amount with specified settings.
InputTooLargeError
Error returned when the input string is too large.
InvalidCharacterError
Error returned when the input contains an invalid character.
MissingDenominationError
Error returned when the denomination is empty.
MissingDigitsError
Error returned when digits were expected in the input but there were none.
OutOfRangeError
Error returned when a parsed amount is too big or too small.
PossiblyConfusingDenominationError
Error returned when parsing a possibly confusing denomination.
SignedAmount
A signed amount.
TooPreciseError
Error returned when the input string has higher precision than satoshis.
UnknownDenominationError
Error returned when parsing an unknown denomination.

Enums§

Denomination
A set of denominations in which amounts can be expressed.
ParseAmountError
An error during amount parsing.
ParseDenominationError
An error during amount parsing.
ParseError
An error during amount parsing amount with denomination.

Traits§

CheckedSum
Calculates the sum over the iterator using checked arithmetic.