Skip to main content

WrappingAddUnsigned

Trait WrappingAddUnsigned 

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

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

Wrapping (modular) 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 wrapping_add_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 WrappingAddUnsigned for i8

Source§

impl WrappingAddUnsigned for i16

Source§

impl WrappingAddUnsigned for i32

Source§

impl WrappingAddUnsigned for i64

Source§

impl WrappingAddUnsigned for i128

Source§

impl WrappingAddUnsigned for isize

Implementors§