pub trait Bits: Sized {
// Required method
fn bits(&self, r: RangeInclusive<usize>) -> Self;
// Provided method
fn bit(&self, n: usize) -> Self { ... }
}
Expand description
Utility trait to make it easier to extract ranges of bits.
Required Methods§
Sourcefn bits(&self, r: RangeInclusive<usize>) -> Self
fn bits(&self, r: RangeInclusive<usize>) -> Self
Get a range of bits.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.