Skip to main content

CheckedDiv

Trait CheckedDiv 

Source
pub trait CheckedDiv<Rhs = Self> {
    type Output;

    // Required method
    fn checked_div(self, rhs: Rhs) -> Option<Self::Output>;
}
Expand description

Checked division supporting potentially different operand widths.

Division returns None when the divisor is zero.

Required Associated Types§

Source

type Output

The type produced by a successful division.

Required Methods§

Source

fn checked_div(self, rhs: Rhs) -> Option<Self::Output>

Divides self by rhs, returning None when rhs is zero.

Implementors§