pub trait BaseOps:
Sized
+ BaseMoney
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>
+ Div<Output = Self>
+ AddAssign
+ SubAssign
+ MulAssign
+ DivAssign
+ Neg<Output = Self> {
// Required methods
fn abs(&self) -> Self;
fn min(&self, rhs: Self) -> Self;
fn max(&self, rhs: Self) -> Self;
fn clamp(&self, from: Decimal, to: Decimal) -> Self;
fn add(&self, rhs: Decimal) -> MoneyResult<Self>;
fn sub(&self, rhs: Decimal) -> MoneyResult<Self>;
fn mul(&self, rhs: Decimal) -> MoneyResult<Self>;
fn div(&self, rhs: Decimal) -> MoneyResult<Self>;
}Required Methods§
fn min(&self, rhs: Self) -> Self
fn max(&self, rhs: Self) -> Self
Sourcefn clamp(&self, from: Decimal, to: Decimal) -> Self
fn clamp(&self, from: Decimal, to: Decimal) -> Self
clamp the money amount between from and to inclusively.
fn add(&self, rhs: Decimal) -> MoneyResult<Self>
fn sub(&self, rhs: Decimal) -> MoneyResult<Self>
fn mul(&self, rhs: Decimal) -> MoneyResult<Self>
fn div(&self, rhs: Decimal) -> MoneyResult<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.