The `from_int_btc_const` constructors are specifically designed for easily creating amount types in const context but currently they return an error which is annoying to handle in const context. If we make the `whole_bitcoin` parameter a 16 bit integer this gives us a nicer const constructor with the downside that it can only create values upto a maximum of - unsigned: 65_536 - signed: 32_767 That is plenty high enough for most use cases. Then use the new `from_int_btc_const` in associated consts. Note that because `from_sat` checks max (and min) values we must define max and min from sats directly. |
||
---|---|---|
.. | ||
amount | ||
fee_rate | ||
locktime | ||
block.rs | ||
fee.rs | ||
internal_macros.rs | ||
lib.rs | ||
parse.rs | ||
time.rs | ||
weight.rs |