rust-bitcoin-unsafe-fast/bitcoin
Tobin C. Harding 6244cb75fa
Introduce monadic AmountOpResult
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.
2025-02-10 10:06:59 +11:00
..
contrib Remove the SliceIndex implementation from hash types 2024-10-02 10:18:45 +10:00
embedded Move opcodes to primitives 2024-07-09 15:26:33 +10:00
examples Introduce monadic AmountOpResult 2025-02-10 10:06:59 +11:00
src Introduce monadic AmountOpResult 2025-02-10 10:06:59 +11:00
tests Use MAX_MONEY in serde regression test 2025-01-24 12:15:13 +11:00
CHANGELOG.md Add unreleased changelog entry 2025-01-25 06:52:26 +11:00
Cargo.toml Remove mutagen 2025-01-21 09:43:12 +11:00