Skip to main content

StrictAddUnsigned

Trait StrictAddUnsigned 

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

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

Strict addition of an unsigned value to 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_add_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 StrictAddUnsigned for i8

Source§

impl StrictAddUnsigned for i16

Source§

impl StrictAddUnsigned for i32

Source§

impl StrictAddUnsigned for i64

Source§

impl StrictAddUnsigned for i128

Source§

impl StrictAddUnsigned for isize

Implementors§