Trait NumericRangeBound

Source
pub trait NumericRangeBound:
    Add<Output = Self>
    + AddAssign
    + Sub<Output = Self>
    + Copy
    + PartialEq
    + Ord {
    const ZERO: Self;
    const ONE: Self;

    // Required method
    fn saturating_sub(self, rhs: Self) -> Self;
}

Required Associated Constants§

Source

const ZERO: Self

Source

const ONE: Self

Required Methods§

Source

fn saturating_sub(self, rhs: 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 NumericRangeBound for u8

Source§

const ZERO: Self = 0u8

Source§

const ONE: Self = 0u8

Source§

fn saturating_sub(self, rhs: Self) -> Self

Source§

impl NumericRangeBound for u16

Source§

const ZERO: Self = 0u16

Source§

const ONE: Self = 0u16

Source§

fn saturating_sub(self, rhs: Self) -> Self

Source§

impl NumericRangeBound for u32

Source§

const ZERO: Self = 0u32

Source§

const ONE: Self = 0u32

Source§

fn saturating_sub(self, rhs: Self) -> Self

Source§

impl NumericRangeBound for u64

Source§

const ZERO: Self = 0u64

Source§

const ONE: Self = 0u64

Source§

fn saturating_sub(self, rhs: Self) -> Self

Source§

impl NumericRangeBound for usize

Source§

const ZERO: Self = 0usize

Source§

const ONE: Self = 0usize

Source§

fn saturating_sub(self, rhs: Self) -> Self

Implementors§