Trait CheckedSub

Source
pub trait CheckedSub {
    type Output;

    // Required method
    fn checked_sub(&self, rhs: &Self) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn checked_sub(&self, rhs: &Self) -> Self::Output

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 CheckedSub for f32

Source§

type Output = Result<f32, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for f64

Source§

type Output = Result<f64, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for i8

Source§

type Output = Result<i8, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for i16

Source§

type Output = Result<i16, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for i32

Source§

type Output = Result<i32, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for i64

Source§

type Output = Result<i64, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for i128

Source§

type Output = Result<i128, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for isize

Source§

type Output = Result<isize, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for u8

Source§

type Output = Result<i8, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for u16

Source§

type Output = Result<i16, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for u32

Source§

type Output = Result<i32, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for u64

Source§

type Output = Result<i64, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for u128

Source§

type Output = Result<i128, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Source§

impl CheckedSub for usize

Source§

type Output = Result<isize, MathError>

Source§

fn checked_sub(&self, rhs: &Self) -> Self::Output

Implementors§