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§
- serde
- This module adds serde serialization and deserialization support for Amounts. Since there is not a default way to serialize and deserialize Amounts, multiple ways are supported and it’s up to the user to decide which serialiation to use. The provided modules can be used as follows:
Structs§
- Amount
- Amount
- Display
- A helper/builder that displays amount with specified settings.
- Input
TooLarge Error - Error returned when the input string is too large.
- Invalid
Character Error - Returned when the input contains an invalid character.
- Missing
Denomination Error - Error returned when the denomination is empty.
- Missing
Digits Error - Error returned when digits were expected in the input but there were none.
- OutOf
Range Error - Returned when a parsed amount is too big or too small.
- Possibly
Confusing Denomination Error - Parsing error, possibly confusing denomination.
- Signed
Amount - SignedAmount
- TooPrecise
Error - Error returned when the input string has higher precision than satoshis.
- Unknown
Denomination Error - Parsing error, unknown denomination.
Enums§
- Denomination
- A set of denominations in which amounts can be expressed.
- Parse
Amount Error - An error during amount parsing.
- Parse
Denomination Error - An error during amount parsing.
- Parse
Error - An error during amount parsing amount with denomination.
Traits§
- Checked
Sum - Calculate the sum over the iterator using checked arithmetic.