pub trait WrappingTrait: Init + Copy + Debug {
    fn wrapping_add_assign64(&mut self, rhs: u64) -> bool;
    fn wrapping_add_assign128_multi32(&mut self, rhs: u128) -> u32;
    fn to_u128(&self) -> u128;
}
Expand description

Represents a counter type that wraps around when incremented past a predetermined upper bound MAX (this bound is not exposed).

Required Methods

Add a value to self. Returns true iff wrap-around has occurred.

rhs must be less than or equal to MAX.

Add a value to self. Returns the number of times for which wrap-around has occurred.

The result must not overflow.

Implementations on Foreign Types

Implementors