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: u32Value defining the position of the least significant bit of the field within the register
width: u32Value defining the bit-width of the bitfield within the register
range_type: BitRangeTypeThe underlying description of the bit range
Implementations
sourceimpl 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
impl Copy 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more