pub trait DivRounded<Rhs, Result = Self> {
fn div_rounded(self, rhs: Rhs) -> Result;
}
Expand description
Division giving a result rounded to fit a Result type.
Returns self / other, rounded as Result.
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for u8 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i8 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for u16 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i16 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for u32 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i32 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for u64 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i64 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i128 where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<i8, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<i16, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<i32, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<i64, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<i128, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<u8, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<u16, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<u32, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,
impl<const P: u8, const R: u8> DivRounded<u64, Decimal<R>> for Decimal<P> where
PrecLimitCheck<{ P <= MAX_PREC }>: True,
PrecLimitCheck<{ R <= MAX_PREC }>: True,