Trait malachite_base::num::arithmetic::traits::CheckedAdd

source ·
pub trait CheckedAdd<RHS = Self> {
    type Output;

    // Required method
    fn checked_add(self, other: RHS) -> Option<Self::Output>;
}
Expand description

Adds two numbers, returning None if the result is not representable.

Required Associated Types§

Required Methods§

source

fn checked_add(self, other: RHS) -> Option<Self::Output>

Implementations on Foreign Types§

source§

impl CheckedAdd for i8

source§

fn checked_add(self, other: i8) -> Option<i8>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = i8

source§

impl CheckedAdd for i16

source§

fn checked_add(self, other: i16) -> Option<i16>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = i16

source§

impl CheckedAdd for i32

source§

fn checked_add(self, other: i32) -> Option<i32>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = i32

source§

impl CheckedAdd for i64

source§

fn checked_add(self, other: i64) -> Option<i64>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = i64

source§

impl CheckedAdd for i128

source§

fn checked_add(self, other: i128) -> Option<i128>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = i128

source§

impl CheckedAdd for isize

source§

fn checked_add(self, other: isize) -> Option<isize>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = isize

source§

impl CheckedAdd for u8

source§

fn checked_add(self, other: u8) -> Option<u8>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = u8

source§

impl CheckedAdd for u16

source§

fn checked_add(self, other: u16) -> Option<u16>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = u16

source§

impl CheckedAdd for u32

source§

fn checked_add(self, other: u32) -> Option<u32>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = u32

source§

impl CheckedAdd for u64

source§

fn checked_add(self, other: u64) -> Option<u64>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = u64

source§

impl CheckedAdd for u128

source§

fn checked_add(self, other: u128) -> Option<u128>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = u128

source§

impl CheckedAdd for usize

source§

fn checked_add(self, other: usize) -> Option<usize>

This is a wrapper over the checked_add functions in the standard library, for example this one.

source§

type Output = usize

Implementors§