We would like to return an error when doing math ops on amount types. We cannot however use the stdlib `Result` or `Option` because we want to implement ops on the result type. Add an `AmountOpResult` type. Return this type from all math operations on `Amount` and `SignedAmount`. Implement `core::iter::Sum` for the new type to allow summing iterators of amounts - somewhat ugly to use, see tests for example usage. |
||
---|---|---|
.. | ||
bip32.rs | ||
create-p2wpkh-address.rs | ||
ecdsa-psbt-simple.rs | ||
ecdsa-psbt.rs | ||
handshake.rs | ||
io.rs | ||
sighash.rs | ||
sign-tx-segwit-v0.rs | ||
sign-tx-taproot.rs | ||
taproot-psbt-simple.rs | ||
taproot-psbt.rs |