pub trait UnsignedExt {
type Type;
// Required methods
fn round_down_to_pow2(self) -> Self::Type;
fn to_str_ranges(self) -> String;
fn from_str_ranges(s: &str) -> Result<Self::Type, String>;
fn bitidx_vec(self) -> Vec<usize>;
}Required Associated Types§
Required Methods§
Sourcefn round_down_to_pow2(self) -> Self::Type
fn round_down_to_pow2(self) -> Self::Type
Round down integer to its closes power-of-two.
Sourcefn to_str_ranges(self) -> String
fn to_str_ranges(self) -> String
Convert integer to a string of bit blocks.
Sourcefn from_str_ranges(s: &str) -> Result<Self::Type, String>
fn from_str_ranges(s: &str) -> Result<Self::Type, String>
Return an integer from a bit flags string.
§Errors
Sourcefn bitidx_vec(self) -> Vec<usize>
fn bitidx_vec(self) -> Vec<usize>
Generate a vector of all bit indexes containing a 1.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".