pub struct Bitfield { /* private fields */ }
Expand description
A bitfield within a structure.
Bitfield
provides information about the offset, size, bit position, and
bit length of a bitfield member. It extends the functionality of Field
by allowing access to individual bits within a field.
Implementations§
Source§impl Bitfield
impl Bitfield
Sourcepub fn new(offset: u64, size: u64, bit_position: u64, bit_length: u64) -> Self
pub fn new(offset: u64, size: u64, bit_position: u64, bit_length: u64) -> Self
Creates a new bitfield descriptor.
Sourcepub fn bit_position(&self) -> u64
pub fn bit_position(&self) -> u64
Returns the starting bit position of the bitfield within the underlying field.
Sourcepub fn bit_length(&self) -> u64
pub fn bit_length(&self) -> u64
Returns the length of the bitfield, in bits.
Trait Implementations§
impl Copy for Bitfield
Auto Trait Implementations§
impl Freeze for Bitfield
impl RefUnwindSafe for Bitfield
impl Send for Bitfield
impl Sync for Bitfield
impl Unpin for Bitfield
impl UnwindSafe for Bitfield
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more