CheckedDiv

Trait CheckedDiv 

Source
pub trait CheckedDiv<Rhs = Self>
where Self: Sized,
{ type Output; type Error; // Required method fn checked_div(self, scalar: Rhs) -> Result<Self::Output, Self::Error>; }

Required Associated Types§

Required Methods§

Source

fn checked_div(self, scalar: Rhs) -> Result<Self::Output, Self::Error>

Checked arithmetic division of self

§Errors

When the result of the division can not be represented (e.g. due to an overflow).

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 CheckedDiv for f64

Source§

type Output = f64

Source§

type Error = DivError<f64, f64>

Source§

fn checked_div(self, rhs: Self) -> Result<Self::Output, Self::Error>

Source§

impl CheckedDiv for i64

Source§

type Output = i64

Source§

type Error = DivError<i64, i64>

Source§

fn checked_div(self, rhs: Self) -> Result<Self::Output, Self::Error>

Source§

impl CheckedDiv for u32

Source§

type Output = u32

Source§

type Error = DivError<u32, u32>

Source§

fn checked_div(self, rhs: Self) -> Result<Self::Output, Self::Error>

Implementors§