[src]

Trait std::num::CheckedDiv

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

Performs division that returns None instead of wrapping around on underflow or overflow.

Required Methods

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

Divides two numbers, checking for underflow or overflow. If underflow or overflow happens, None is returned.

Implementors