money

Sample code for my talk Idiomatic Rust, which I gave at FOSDEM 2018.

Stars
6

Sample code for my talk Idiomatic Rust, which I gave at FOSDEM 2018.

This library shows how to create ergonomic value objects in Rust. The point of this case-study is to show common Rust idiomas and patterns. A word of caution: this code is for educational purposes only. Generally, it's a bad idea to represent a monetary value as float. If you want to implement something similar for real-world use-cases, read this first.

Only works on nightly Rust for now until slice patterns are stabilized.

License

MIT

Logo designed by Freepik