pub struct ByteEnabledDwordRead<'a> { /* private fields */ }Expand description
A DWORD value with byte enables for PCI configuration space read.
Implementations§
Source§impl<'a> ByteEnabledDwordRead<'a>
impl<'a> ByteEnabledDwordRead<'a>
Sourcepub const fn new(value: &'a mut u32, byte_enable: PciConfigByteEnable) -> Self
pub const fn new(value: &'a mut u32, byte_enable: PciConfigByteEnable) -> Self
Create a byte-enabled DWORD value.
Sourcepub const fn with_all_bytes_enabled(value: &'a mut u32) -> Self
pub const fn with_all_bytes_enabled(value: &'a mut u32) -> Self
Create a full-DWORD value with all byte lanes enabled.
Sourcepub const fn byte_enable(&self) -> PciConfigByteEnable
pub const fn byte_enable(&self) -> PciConfigByteEnable
Retrieve the underlying byte enable.
Sourcepub fn fill_intercept_buffer(self, buffer: &mut [u8])
pub fn fill_intercept_buffer(self, buffer: &mut [u8])
Fill the intercept buffer with the enabled byte lanes of the DWORD.
Sourcepub fn into_valid_byte_slice(self) -> &'a mut [u8] ⓘ
pub fn into_valid_byte_slice(self) -> &'a mut [u8] ⓘ
Retrieve a mutable slice of the enabled byte lanes of the DWORD.
Sourcepub const fn valid_mask(&self) -> u32
pub const fn valid_mask(&self) -> u32
Get the mask of valid bytes.
Sourcepub fn set_low_high(&mut self, low: u16, high: u16)
pub fn set_low_high(&mut self, low: u16, high: u16)
Update the value of the DWORD, honoring byte enables.
Sourcepub fn set_bytes(&mut self, byte0: u8, byte1: u8, byte2: u8, byte3: u8)
pub fn set_bytes(&mut self, byte0: u8, byte1: u8, byte2: u8, byte3: u8)
Update the value of the DWORD, honoring byte enables.
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.
Sourcepub fn reborrow(&mut self) -> ByteEnabledDwordRead<'_>
pub fn reborrow(&mut self) -> ByteEnabledDwordRead<'_>
Reborrow the underlying value.
Sourcepub fn restrict(
&mut self,
byte_enable: PciConfigByteEnable,
) -> Option<ByteEnabledDwordRead<'_>>
pub fn restrict( &mut self, byte_enable: PciConfigByteEnable, ) -> Option<ByteEnabledDwordRead<'_>>
Restrict the read to only the provided bytes.
Sourcepub fn exclude(
&mut self,
byte_enable: PciConfigByteEnable,
) -> Option<ByteEnabledDwordRead<'_>>
pub fn exclude( &mut self, byte_enable: PciConfigByteEnable, ) -> Option<ByteEnabledDwordRead<'_>>
Exclude the provided bytes from the read.
Trait Implementations§
Source§impl<'a> Debug for ByteEnabledDwordRead<'a>
impl<'a> Debug for ByteEnabledDwordRead<'a>
Source§impl<'a> InspectMut for ByteEnabledDwordRead<'a>
impl<'a> InspectMut for ByteEnabledDwordRead<'a>
Source§fn inspect_mut(&mut self, req: Request<'_>)
fn inspect_mut(&mut self, req: Request<'_>)
Inspects the object.
Auto Trait Implementations§
impl<'a> Freeze for ByteEnabledDwordRead<'a>
impl<'a> RefUnwindSafe for ByteEnabledDwordRead<'a>
impl<'a> Send for ByteEnabledDwordRead<'a>
impl<'a> Sync for ByteEnabledDwordRead<'a>
impl<'a> Unpin for ByteEnabledDwordRead<'a>
impl<'a> UnsafeUnpin for ByteEnabledDwordRead<'a>
impl<'a> !UnwindSafe for ByteEnabledDwordRead<'a>
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