Module amount

Module amount 

Source
Expand description

amount related structures

Structs§

Amount
A structure representing a decimal Amount of coins with safe operations this allows ensuring that there is never an uncontrolled overflow or precision loss while providing a convenient decimal interface for users The underlying u64 raw representation if a fixed-point value with factor AMOUNT_DECIMAL_FACTOR The minimal value is 0 and the maximal value is 18446744073.709551615(std::u64::MAX/1e9)
AmountDeserializer
Deserializer for amount
AmountSerializer
Serializer for amount
AmountVisitor 🔒

Constants§

AMOUNT_DECIMAL_FACTOR
Decimals factor for the amount
AMOUNT_DECIMAL_SCALE
Decimals scale for the amount