pub trait BitFieldAccess: Sealed {
// Required methods
fn get_bitfield(&self, mask: Self, shift: u32) -> Self;
fn set_bitfield(&mut self, mask: Self, shift: u32, value: Self);
}Expand description
Bitfield access functionality
Note: this trait is sealed against implementation outside this crate. This restriction will be lifted once the API has stabilized.
Required Methods§
Sourcefn get_bitfield(&self, mask: Self, shift: u32) -> Self
fn get_bitfield(&self, mask: Self, shift: u32) -> Self
Returns a copy of self masked by mask and shifted right by shift
Sourcefn set_bitfield(&mut self, mask: Self, shift: u32, value: Self)
fn set_bitfield(&mut self, mask: Self, shift: u32, value: Self)
Shifts value left by shift and replaces bits in self using mask.
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.