pub trait CheckedEuclid: Euclid {
    // Required methods
    fn checked_div_euclid(&self, v: &Self) -> Option<Self>;
    fn checked_rem_euclid(&self, v: &Self) -> Option<Self>;
}

Required Methods§

source

fn checked_div_euclid(&self, v: &Self) -> Option<Self>

Performs euclid division that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.

source

fn checked_rem_euclid(&self, v: &Self) -> Option<Self>

Finds the euclid remainder of dividing two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned.

Implementations on Foreign Types§

source§

impl CheckedEuclid for i64

source§

fn checked_div_euclid(&self, v: &i64) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &i64) -> Option<Self>

source§

impl CheckedEuclid for usize

source§

fn checked_div_euclid(&self, v: &usize) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &usize) -> Option<Self>

source§

impl CheckedEuclid for u64

source§

fn checked_div_euclid(&self, v: &u64) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &u64) -> Option<Self>

source§

impl CheckedEuclid for i32

source§

fn checked_div_euclid(&self, v: &i32) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &i32) -> Option<Self>

source§

impl CheckedEuclid for u32

source§

fn checked_div_euclid(&self, v: &u32) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &u32) -> Option<Self>

source§

impl CheckedEuclid for i128

source§

fn checked_div_euclid(&self, v: &i128) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &i128) -> Option<Self>

source§

impl CheckedEuclid for i16

source§

fn checked_div_euclid(&self, v: &i16) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &i16) -> Option<Self>

source§

impl CheckedEuclid for i8

source§

fn checked_div_euclid(&self, v: &i8) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &i8) -> Option<Self>

source§

impl CheckedEuclid for isize

source§

fn checked_div_euclid(&self, v: &isize) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &isize) -> Option<Self>

source§

impl CheckedEuclid for u8

source§

fn checked_div_euclid(&self, v: &u8) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &u8) -> Option<Self>

source§

impl CheckedEuclid for u16

source§

fn checked_div_euclid(&self, v: &u16) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &u16) -> Option<Self>

source§

impl CheckedEuclid for u128

source§

fn checked_div_euclid(&self, v: &u128) -> Option<Self>

source§

fn checked_rem_euclid(&self, v: &u128) -> Option<Self>

Implementors§