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 Amount
s returns
Result
s.
Modules§
- arbitrary
- Randomised test case generation for amounts.
Structs§
- Amount
- A runtime validated type for representing amounts of zatoshis
- Deferred
Pool Balance Change - Represents a change to the deferred pool balance from a coinbase transaction.
- Negative
Allowed - Marker type for
Amount
that allows negative values. - Negative
OrZero - Marker type for
Amount
that requires negative or zero values. - NonNegative
- Marker type for
Amount
that requires nonnegative values.
Enums§
Constants§
Traits§
- Constraint
- A trait for defining constraints on
Amount
Type Aliases§
- Result
- The result of an amount operation.