exint 0.1.4

An implementation of generic signed and unsigned integers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Returns the smallest power of two greater than or equal to `self`.

If the next power of two is greater than the type's maximum value,
`None` is returned, otherwise the power of two is wrapped in `Some`.

# Examples

Basic usage:

```
# use ::exint::primitive::*;
# ::exint::uint! {
assert_eq!(2_u24.checked_next_power_of_two(), Some(2_u24));
assert_eq!(3_u24.checked_next_power_of_two(), Some(4_u24));
assert_eq!(u24::MAX.checked_next_power_of_two(), None);
# }
```