Trait num_traits::ops::checked::CheckedDiv[][src]

pub trait CheckedDiv: Sized + Div<Self, Output = Self> {
    fn checked_div(&self, v: &Self) -> Option<Self>;
}

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

Required Methods

Divides two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned.

Implementors