Expand description
Strongly-typed zatoshi amounts that prevent under/overflows.
The Amount type is parameterized by a Constraint implementation that
declares the range of allowed values. In contrast to regular arithmetic
operations, which return values, arithmetic on Amounts returns
Results.
Structs§
- A runtime validated type for representing amounts of zatoshis
- Marker type for
Amountthat allows negative values. - Marker type for
Amountthat requires negative or zero values. - Marker type for
Amountthat requires nonnegative values.
Enums§
- Errors that can be returned when validating
Amounts.
Constants§
- Number of zatoshis in 1 ZEC
- The maximum zatoshi amount.
Traits§
- A trait for defining constraints on
Amount
Type Aliases§
- The result of an amount operation.