pub struct BitRange {
pub offset: u32,
pub width: u32,
pub range_type: BitRangeType,
}
Expand description
A bit range, describing the least significant bit and most significant bit
Fields§
§offset: u32
Value defining the position of the least significant bit of the field within the register
width: u32
Value defining the bit-width of the bitfield within the register
range_type: BitRangeType
The underlying description of the bit range
Implementations§
source§impl BitRange
impl BitRange
sourcepub fn from_offset_width(offset: u32, width: u32) -> Self
pub fn from_offset_width(offset: u32, width: u32) -> Self
Construct a BitRange
from a offset and width
sourcepub fn from_msb_lsb(msb: u32, lsb: u32) -> Self
pub fn from_msb_lsb(msb: u32, lsb: u32) -> Self
Construct a BitRange
from a msb and lsb
sourcepub fn from_bit_range(text: &str) -> Option<Self>
pub fn from_bit_range(text: &str) -> Option<Self>
Construct a BitRange
from a string in the format [<msb>:<lsb>]
Trait Implementations§
source§impl PartialEq for BitRange
impl PartialEq for BitRange
impl Copy for BitRange
impl Eq for BitRange
impl StructuralEq for BitRange
impl StructuralPartialEq for BitRange
Auto Trait Implementations§
impl RefUnwindSafe for BitRange
impl Send for BitRange
impl Sync for BitRange
impl Unpin for BitRange
impl UnwindSafe for BitRange
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