Skip to main content

StrictSubUnsigned

Trait StrictSubUnsigned 

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

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

Strict 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 strict_sub_unsigned(self, rhs: Self::Unsigned) -> Self::Output

Computes self - rhs, panicking on overflow even in release builds.

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 StrictSubUnsigned for i8

Source§

impl StrictSubUnsigned for i16

Source§

impl StrictSubUnsigned for i32

Source§

impl StrictSubUnsigned for i64

Source§

impl StrictSubUnsigned for i128

Source§

impl StrictSubUnsigned for isize

Implementors§