Trait num::CheckedDiv [] [src]

pub trait CheckedDiv: 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.

Implementations on Foreign Types

impl CheckedDiv for isize
[src]

[src]

impl CheckedDiv for u32
[src]

[src]

impl CheckedDiv for u8
[src]

[src]

impl CheckedDiv for i8
[src]

[src]

impl CheckedDiv for i16
[src]

[src]

impl CheckedDiv for u64
[src]

[src]

impl CheckedDiv for i64
[src]

[src]

impl CheckedDiv for u16
[src]

[src]

impl CheckedDiv for usize
[src]

[src]

impl CheckedDiv for i32
[src]

[src]

impl<T> CheckedDiv for Ratio<T> where
    T: Clone + Integer + CheckedMul
[src]

[src]

Implementors