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
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 · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
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