Skip to main content

WrappingAddSigned

Trait WrappingAddSigned 

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

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

Wrapping (modular) addition of a signed value to 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_add_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 WrappingAddSigned for u8

Source§

impl WrappingAddSigned for u16

Source§

impl WrappingAddSigned for u32

Source§

impl WrappingAddSigned for u64

Source§

impl WrappingAddSigned for u128

Source§

impl WrappingAddSigned for usize

Implementors§