SafeDiv

Trait SafeDiv 

Source
pub trait SafeDiv: Sized {
    // Required methods
    fn checked_div(&self, r: &Self) -> Option<Self>;
    fn saturating_div(&self, r: &Self) -> Self;
    fn wrapping_div(&self, r: &Self) -> Self;
}

Required Methods§

Source

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

Source

fn saturating_div(&self, r: &Self) -> Self

Source

fn wrapping_div(&self, r: &Self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SafeDiv for f32

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for f64

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for i8

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for i16

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for i32

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for i64

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for i128

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for u8

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for u16

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for u32

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for u64

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Source§

impl SafeDiv for u128

Source§

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

Source§

fn saturating_div(&self, r: &Self) -> Self

Source§

fn wrapping_div(&self, r: &Self) -> Self

Implementors§