cowry 0.1.0

A micro-library for precise currency math and rounding control in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
#[derive(Debug, thiserror::Error)]
pub enum OwoError {
    #[error("Currency mismatch: {0} vs {1}")]
    CurrencyMismatch(String, String),

    #[error("Division by zero is not allowed")]
    DivisionByZero,

    #[error("Invalid JSON: {0}")]
    SerdeError(#[from] serde_json::Error),
}