Expand description
Defines the UnsignedPrimInt trait and its generic operations.
These are module functions rather than trait functions to avoid polluting the primitive integer namespaces.
Structs§
- Debug
Desc - The description of an unsigned integer returned by
debug_desc.
Traits§
- Unsigned
Prim Int - An unsigned primitive integer.
Functions§
- checked_
add - Add the specified value to the integer,
returning
Noneif overflow occurs. - checked_
cast - Cast from one
UnsignedPrimIntinto another, returningNoneif there is overflow. - checked_
sub - Subtract the specified value from the integer,
returning
Noneif overflow occurs. - debug_
desc - Attempt to describe the specified
UnsignedPrimIntin a format suitable for debugging or panic messages. - from_
usize_ checked - Convert a primitive integer to a
usize, returningNoneif overflow occurs. - from_
usize_ wrapping - Convert a primitive integer to a
usize, wrapping around if overflow occurs. - max_
value - Determine the maximum value of the specified
UnsignedPrimInt. - one
- Determine the one value of the specified
UnsignedPrimInt. - to_
usize_ checked - Convert a primitive integer to a
usize, returningNoneif overflow occurs. - to_
usize_ wrapping - Convert a primitive integer to a
usize, wrapping around on overflow. - zero
- Determine the zero value of the specified
UnsignedPrimInt.