Skip to main content

ConstCheckedRem

Trait ConstCheckedRem 

Source
pub trait ConstCheckedRem:
    Sized
    + Rem<Output = Self>
    + ConstZero {
    // Required method
    fn checked_rem(&self, v: &Self) -> Option<Self>;
}
Expand description

Const-compatible checked remainder.

Required Methods§

Source

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

Checked remainder. Returns None if the divisor is zero.

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 ConstCheckedRem for u8

Source§

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

Source§

impl ConstCheckedRem for u16

Source§

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

Source§

impl ConstCheckedRem for u32

Source§

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

Source§

impl ConstCheckedRem for u64

Source§

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

Source§

impl ConstCheckedRem for u128

Source§

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

Implementors§

Source§

impl<T: ConstMachineWord + MachineWord, const N: usize> ConstCheckedRem for FixedUInt<T, N>