Trait num_traits::ops::saturating::SaturatingAdd [−][src]
pub trait SaturatingAdd: Sized + Add<Self, Output = Self> { fn saturating_add(&self, v: &Self) -> Self; }
Performs addition that saturates at the numeric bounds instead of overflowing.
Required methods
fn saturating_add(&self, v: &Self) -> Self
[src]
Saturating addition. Computes self + other
, saturating at the relevant high or low boundary of
the type.
Implementations on Foreign Types
impl SaturatingAdd for u8
[src]
impl SaturatingAdd for u8
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for u16
[src]
impl SaturatingAdd for u16
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for u32
[src]
impl SaturatingAdd for u32
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for u64
[src]
impl SaturatingAdd for u64
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for usize
[src]
impl SaturatingAdd for usize
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for u128
[src]
impl SaturatingAdd for u128
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for i8
[src]
impl SaturatingAdd for i8
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for i16
[src]
impl SaturatingAdd for i16
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for i32
[src]
impl SaturatingAdd for i32
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for i64
[src]
impl SaturatingAdd for i64
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for isize
[src]
impl SaturatingAdd for isize
[src]fn saturating_add(&self, v: &Self) -> Self
[src]
impl SaturatingAdd for i128
[src]
impl SaturatingAdd for i128
[src]