pub struct Extent { /* private fields */ }Expand description
A field’s bit offset and width, numbered LSB0.
Bit N of the container is bit N of the u128 the accessors take.
Ordered by (start, width), which is wire order in a valid field table.
Implementations§
Source§impl Extent
impl Extent
Sourcepub const fn extract_wide(&self, bits: u128) -> u128
pub const fn extract_wide(&self, bits: u128) -> u128
Read the field from a container.
Sourcepub const fn insert_wide(&self, bits: u128, value: u128) -> u128
pub const fn insert_wide(&self, bits: u128, value: u128) -> u128
Write the field into a container and return the result.
value is masked to the field’s width.
Sourcepub const fn extract(&self, bits: u128) -> u64
pub const fn extract(&self, bits: u128) -> u64
extract_wide for fields up to 64 bits.
Trait Implementations§
impl Copy for Extent
impl Eq for Extent
Source§impl Ord for Extent
impl Ord for Extent
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Extent
impl PartialOrd for Extent
impl StructuralPartialEq for Extent
Auto Trait Implementations§
impl Freeze for Extent
impl RefUnwindSafe for Extent
impl Send for Extent
impl Sync for Extent
impl Unpin for Extent
impl UnsafeUnpin for Extent
impl UnwindSafe for Extent
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