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

Implementations on Foreign Types

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.

Implementors