snarkvm_console_network_environment::traits::arithmetic

Trait AddSaturating

Source
pub trait AddSaturating<Rhs: ?Sized = Self> {
    type Output;

    // Required method
    fn add_saturating(&self, rhs: &Rhs) -> Self::Output;
}
Expand description

Binary operator for adding two values, bounding the sum to MAX if an overflow occurs.

Required Associated Types§

Required Methods§

Source

fn add_saturating(&self, rhs: &Rhs) -> Self::Output

Implementors§