Skip to main content

WrappingSubSigned

Trait WrappingSubSigned 

Source
pub trait WrappingSubSigned: Sized {
    type Signed;
    type Output;

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

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

Required Associated Types§

Source

type Signed

The counterpart type of opposite signedness.

Source

type Output

The (owned) result type.

Required Methods§

Source

fn wrapping_sub_signed(self, rhs: Self::Signed) -> 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 WrappingSubSigned for u8

Source§

impl WrappingSubSigned for u16

Source§

impl WrappingSubSigned for u32

Source§

impl WrappingSubSigned for u64

Source§

impl WrappingSubSigned for u128

Source§

impl WrappingSubSigned for usize

Implementors§