pub struct ByteEnabledDwordWrite { /* private fields */ }Expand description
A DWORD value with byte enables for PCI configuration space write.
Implementations§
Source§impl ByteEnabledDwordWrite
impl ByteEnabledDwordWrite
Sourcepub const fn new(value: u32, byte_enable: PciConfigByteEnable) -> Self
pub const fn new(value: u32, byte_enable: PciConfigByteEnable) -> Self
Create a byte-enabled DWORD value.
Sourcepub const fn with_all_bytes_enabled(value: u32) -> Self
pub const fn with_all_bytes_enabled(value: u32) -> Self
Create a full-DWORD value with all byte lanes enabled.
Sourcepub fn from_intercept_buffer(
byte_enable: PciConfigByteEnable,
buffer: &[u8],
) -> Self
pub fn from_intercept_buffer( byte_enable: PciConfigByteEnable, buffer: &[u8], ) -> Self
Create a byte-enabled DWORD value from a slice of bytes.
Sourcepub fn as_valid_byte_slice(&self) -> &[u8] ⓘ
pub fn as_valid_byte_slice(&self) -> &[u8] ⓘ
Retrieve a mutable slice of the enabled byte lanes of the DWORD.
Sourcepub const fn byte_enable(&self) -> PciConfigByteEnable
pub const fn byte_enable(&self) -> PciConfigByteEnable
Retrieve the underlying byte enable.
Sourcepub const fn valid_mask(self) -> u32
pub const fn valid_mask(self) -> u32
Get the mask of valid bytes.
Sourcepub const fn merge(self, current_value: u32) -> u32
pub const fn merge(self, current_value: u32) -> u32
Merge enabled byte lanes from this value into current_value.
Sourcepub const fn merge_into(self, current_value: &mut u32)
pub const fn merge_into(self, current_value: &mut u32)
Merge enabled byte lanes from this value into current_value (read-modify-write).
Sourcepub const fn merge_low(self, current_value: u16) -> u16
pub const fn merge_low(self, current_value: u16) -> u16
Merge enabled byte lanes from the low WORD of this value into current_value.
Sourcepub const fn merge_high(self, current_value: u16) -> u16
pub const fn merge_high(self, current_value: u16) -> u16
Merge enabled byte lanes from the high WORD of this value into current_value.
Sourcepub const fn extract_low(self) -> u16
pub const fn extract_low(self) -> u16
Keep only enabled byte lanes from the low WORD this value.
Sourcepub const fn extract_high(self) -> u16
pub const fn extract_high(self) -> u16
Keep only enabled byte lanes from the high WORD this value.
Trait Implementations§
Source§impl Clone for ByteEnabledDwordWrite
impl Clone for ByteEnabledDwordWrite
Source§fn clone(&self) -> ByteEnabledDwordWrite
fn clone(&self) -> ByteEnabledDwordWrite
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ByteEnabledDwordWrite
impl Debug for ByteEnabledDwordWrite
Source§impl Inspect for ByteEnabledDwordWrite
impl Inspect for ByteEnabledDwordWrite
Source§impl PartialEq for ByteEnabledDwordWrite
impl PartialEq for ByteEnabledDwordWrite
impl Copy for ByteEnabledDwordWrite
impl Eq for ByteEnabledDwordWrite
impl StructuralPartialEq for ByteEnabledDwordWrite
Auto Trait Implementations§
impl Freeze for ByteEnabledDwordWrite
impl RefUnwindSafe for ByteEnabledDwordWrite
impl Send for ByteEnabledDwordWrite
impl Sync for ByteEnabledDwordWrite
impl Unpin for ByteEnabledDwordWrite
impl UnsafeUnpin for ByteEnabledDwordWrite
impl UnwindSafe for ByteEnabledDwordWrite
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