Struct std::num::Wrapping
[−]
[src]
pub struct Wrapping<T>(pub T);
Provides intentionally-wrapped arithmetic on T`T`.
Operations like +`+on` on u32`u32` values is intended to never overflow,
and in some debug configurations overflow is detected and results
in a panic. While most arithmetic falls into this category, some
code explicitly expects and relies upon modular arithmetic (e.g.,
hashing).
Wrapping arithmetic can be achieved either through methods like
wrapping_add`wrapping_add, or through the`, or through the Wrapping<T>`Wrapping