Trait solana_sdk::arithmetic::SaturatingArithmetic [−][src]
pub trait SaturatingArithmetic<T> { fn sol_saturating_add(&self, rhs: Self) -> Self; fn sol_saturating_sub(&self, rhs: Self) -> Self; fn sol_saturating_mul(&self, rhs: T) -> Self; }
Expand description
A helper trait for primitive types that do not yet implement saturating arithmetic methods
Required methods
fn sol_saturating_add(&self, rhs: Self) -> Self
[src]
fn sol_saturating_sub(&self, rhs: Self) -> Self
[src]
fn sol_saturating_mul(&self, rhs: T) -> Self
[src]
Implementations on Foreign Types
impl SaturatingArithmetic<u32> for Duration
[src]
impl SaturatingArithmetic<u32> for Duration
[src]Saturating arithmetic for Duration, until Rust support moves from nightly to stable Duration::MAX is constructed manually, as Duration consts are not yet stable either.