Skip to main content

NumericRangeBound

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 = 0

Source§

const ONE: Self = 0

Source§

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

Source§

impl NumericRangeBound for u16

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 0

Source§

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

Source§

impl NumericRangeBound for u32

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 0

Source§

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

Source§

impl NumericRangeBound for u64

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 0

Source§

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

Source§

impl NumericRangeBound for usize

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 0

Source§

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

Implementors§