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; }

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]

Loading content...

Implementations on Foreign Types

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.

Loading content...

Implementors

Loading content...