Commit graph

5 commits

Author SHA1 Message Date
Bruno BELANYI 17e7bb9988 core: implement display for all core types 2022-08-23 15:35:53 +02:00
Bruno BELANYI 19b5f3390d core: add arithmetic operators for 'TxAmount' 2022-08-23 14:05:03 +02:00
Bruno BELANYI 963748e1d9 core: define 'TxAmount::ZERO' 2022-08-23 14:05:03 +02:00
Bruno BELANYI ffd6a20a30 transaction: add CSV deserialization
It is unfortunate that both [1] and [2] conspire to make this code way
worse than it could otherwise be with a saner (de)serialization format.

We both need to introduce `TransactionRecord` due to tagged enums not
being powerful enough in CSV, and make its `amount` field optional to
deal with the varying number of fields for each kind of transaction.

[1]: https://github.com/BurntSushi/rust-csv/issues/211
[2]: https://github.com/BurntSushi/rust-csv/issues/172
2022-08-23 14:05:03 +02:00
Bruno BELANYI eae54b8ce0 lib: add core type definitions 2022-08-23 14:05:03 +02:00