[][src]Trait sp_arithmetic::traits::Saturating

pub trait Saturating {
    fn saturating_add(self, o: Self) -> Self;
fn saturating_sub(self, o: Self) -> Self;
fn saturating_mul(self, o: Self) -> Self; }

Simple trait to use checked mul and max value to give a saturated mul operation over supported types.

Required methods

fn saturating_add(self, o: Self) -> Self

Saturated addition - if the product can't fit in the type then just use max-value.

fn saturating_sub(self, o: Self) -> Self

Saturated subtraction - if the product can't fit in the type then just use max-value.

fn saturating_mul(self, o: Self) -> Self

Saturated multiply - if the product can't fit in the type then just use max-value.

Loading content...

Implementors

impl Saturating for Fixed64[src]

impl Saturating for Perbill[src]

impl Saturating for Percent[src]

impl Saturating for Permill[src]

impl Saturating for Perquintill[src]

impl<T: CheckedMul + Bounded + Saturating> Saturating for T[src]

Loading content...