should-i-rent/crates/immo-core
Marcel Enguehard 3ab4a4064a Add Euros::from_euros_as_decimal with a typed error
Converting a Decimal amount into integer cents can fail two ways: the value
carries sub-cent precision, or it does not fit in an i64 once scaled. Both are
reported through EurosError rather than silently truncating, since a money type
that rounds without being asked is the wrong kind of convenient.

The scale check demands exactly 2 rather than at most 2, so callers have to be
explicit about the precision they are handing over.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 15:17:47 +02:00
..
src Add Euros::from_euros_as_decimal with a typed error 2026-08-23 15:17:47 +02:00
Cargo.toml Add LoanOffer with validating constructor 2026-07-30 15:09:49 +02:00