Skip to main content

StrictSubSigned

Trait StrictSubSigned 

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

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

Strict 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 strict_sub_signed(self, rhs: Self::Signed) -> 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 StrictSubSigned for u8

Source§

impl StrictSubSigned for u16

Source§

impl StrictSubSigned for u32

Source§

impl StrictSubSigned for u64

Source§

impl StrictSubSigned for u128

Source§

impl StrictSubSigned for usize

Implementors§