Trait CheckedAdd

Source
pub trait CheckedAdd {
    type Output;

    // Required method
    fn checked_add(&self, rhs: &Self) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CheckedAdd for f32

Source§

type Output = Result<f32, MathError>

Source§

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

Source§

impl CheckedAdd for f64

Source§

type Output = Result<f64, MathError>

Source§

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

Source§

impl CheckedAdd for i8

Source§

type Output = Result<i8, MathError>

Source§

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

Source§

impl CheckedAdd for i16

Source§

type Output = Result<i16, MathError>

Source§

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

Source§

impl CheckedAdd for i32

Source§

type Output = Result<i32, MathError>

Source§

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

Source§

impl CheckedAdd for i64

Source§

type Output = Result<i64, MathError>

Source§

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

Source§

impl CheckedAdd for i128

Source§

type Output = Result<i128, MathError>

Source§

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

Source§

impl CheckedAdd for isize

Source§

type Output = Result<isize, MathError>

Source§

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

Source§

impl CheckedAdd for u8

Source§

type Output = Result<u8, MathError>

Source§

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

Source§

impl CheckedAdd for u16

Source§

type Output = Result<u16, MathError>

Source§

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

Source§

impl CheckedAdd for u32

Source§

type Output = Result<u32, MathError>

Source§

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

Source§

impl CheckedAdd for u64

Source§

type Output = Result<u64, MathError>

Source§

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

Source§

impl CheckedAdd for u128

Source§

type Output = Result<u128, MathError>

Source§

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

Source§

impl CheckedAdd for usize

Source§

type Output = Result<usize, MathError>

Source§

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

Implementors§