pub trait WrappingSub: Sized + Sub<Self, Output = Self> {
    // Required method
    fn wrapping_sub(&self, v: &Self) -> Self;
}
Expand description

Performs subtraction that wraps around on overflow.

Required Methods§

source

fn wrapping_sub(&self, v: &Self) -> Self

Wrapping (modular) subtraction. Computes self - other, wrapping around at the boundary of the type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl WrappingSub for i8

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for i16

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for i32

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for i64

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for i128

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for isize

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for u8

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for u16

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for u32

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for u64

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for u128

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl WrappingSub for usize

source§

fn wrapping_sub(&self, v: &Self) -> Self

source§

impl<T: WrappingSub> WrappingSub for Wrapping<T>where Wrapping<T>: Sub<Output = Wrapping<T>>,

source§

fn wrapping_sub(&self, v: &Self) -> Self

Implementors§