u32
and other primitive integer types implement a number of bit-manipulation methods like rotate_left
, but Wrapping<_>
does not. At the moment this can be worked around with code like Wrapping(x.0.rotate_left(n))
instead of x.rotate_left(n)
.
It would be nice to implement:
count_ones
count_zeroes
leading_zeroes
trailing_zeroes
rotate_left
rotate_right
swap_bytes
from_be
(?)from_le
(?)to_be
to_le
pow
(?)Edit: Others added after #32463 (comment)
is_power_of_two
(?)next_power_of_two
(?)min_value
(?)max_value
(?)from_str_radix
(?)reverse_bits
abs
Add missing Wrapping methods, use doc_comment! #49393 Add missing Wrapping methods, use doc_comment! #50465signum
Add missing Wrapping methods, use doc_comment! #49393 Add missing Wrapping methods, use doc_comment! #50465is_positive
Add missing Wrapping methods, use doc_comment! #49393 Add missing Wrapping methods, use doc_comment! #50465is_negative
Add missing Wrapping methods, use doc_comment! #49393 Add missing Wrapping methods, use doc_comment! #50465and maybe other methods, for:
Wrapping<u8>
Wrapping<u16>
Wrapping<u32>
Wrapping<u64>
Wrapping<usize>
Wrapping<i8>
Wrapping<i16>
Wrapping<i32>
Wrapping<i64>
Wrapping<isize>
Edit: From #50465
wrapping_next_power_of_two
stepancheg, stanislav-tkach, stevenlr, chuigda, honnza and 5 morebjoernager
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4