Skip to main content

WrappingSubUnsigned

Trait WrappingSubUnsigned 

Source
pub trait WrappingSubUnsigned: Sized {
    type Unsigned;
    type Output;

    // Required method
    fn wrapping_sub_unsigned(self, rhs: Self::Unsigned) -> Self::Output;
}
Expand description

Wrapping (modular) subtraction of an unsigned value from a signed value.

Required Associated Types§

Source

type Unsigned

The counterpart type of opposite signedness.

Source

type Output

The (owned) result type.

Required Methods§

Source

fn wrapping_sub_unsigned(self, rhs: Self::Unsigned) -> Self::Output

Computes self - rhs, wrapping around at the boundary of the type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl WrappingSubUnsigned for i8

Source§

impl WrappingSubUnsigned for i16

Source§

impl WrappingSubUnsigned for i32

Source§

impl WrappingSubUnsigned for i64

Source§

impl WrappingSubUnsigned for i128

Source§

impl WrappingSubUnsigned for isize

Implementors§