basis_points/error.rs
1use thiserror::Error;
2
3/// Errors returned by `BasisPoints` validation and conversions.
4#[derive(Debug, Error, PartialEq, Eq)]
5pub enum BasisPointsError {
6 /// Basis points must be less than or equal to `10_000`.
7 #[error("Basis points must be less than or equal to 10000")]
8 InvalidBasisPoints,
9 /// Decimal could not be safely cast to the target integer type.
10 #[error("Decimal could not be safely casted to the target type")]
11 ConversionFailed,
12}