pub struct PciConfigByteEnable(/* private fields */);Expand description
Byte enables for the four lanes of a PCI configuration DWORD.
Implementations§
Source§impl PciConfigByteEnable
impl PciConfigByteEnable
Sourcepub const fn from_offset_len(offset: u16, len: usize) -> Result<Self, IoError>
pub const fn from_offset_len(offset: u16, len: usize) -> Result<Self, IoError>
Create byte enables for an access at offset with byte length len.
Sourcepub const fn to_byte_offset_len(self) -> (u16, usize)
pub const fn to_byte_offset_len(self) -> (u16, usize)
Returns the byte offset of the first enabled byte in the DWORD and the number of enabled bytes.
Sourcepub const fn merge(self, current_value: u32, write_value: u32) -> u32
pub const fn merge(self, current_value: u32, write_value: u32) -> u32
Merge enabled byte lanes from write_value into current_value.
Sourcepub const fn restrict(self, byte_enable: PciConfigByteEnable) -> Option<Self>
pub const fn restrict(self, byte_enable: PciConfigByteEnable) -> Option<Self>
Restrict the underlying byte enable to only include the provided bytes, or None when no bytes would be left enabled.
Sourcepub const fn exclude(self, byte_enable: PciConfigByteEnable) -> Option<Self>
pub const fn exclude(self, byte_enable: PciConfigByteEnable) -> Option<Self>
Exclude the provided bytes from the underlying byte enable, returning None when no bytes would be left enabled.
Trait Implementations§
Source§impl Clone for PciConfigByteEnable
impl Clone for PciConfigByteEnable
Source§fn clone(&self) -> PciConfigByteEnable
fn clone(&self) -> PciConfigByteEnable
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 PciConfigByteEnable
impl Debug for PciConfigByteEnable
Source§impl DefaultEncoding for PciConfigByteEnable
impl DefaultEncoding for PciConfigByteEnable
Source§impl Inspect for PciConfigByteEnable
impl Inspect for PciConfigByteEnable
Source§impl PartialEq for PciConfigByteEnable
impl PartialEq for PciConfigByteEnable
Source§impl<'encoding> StructDecodeMetadata<'encoding, Resource> for PciConfigByteEnable
impl<'encoding> StructDecodeMetadata<'encoding, Resource> for PciConfigByteEnable
Source§impl StructEncodeMetadata<Resource> for PciConfigByteEnable
impl StructEncodeMetadata<Resource> for PciConfigByteEnable
Source§impl StructMetadata for PciConfigByteEnable
impl StructMetadata for PciConfigByteEnable
impl Copy for PciConfigByteEnable
impl Eq for PciConfigByteEnable
impl StructuralPartialEq for PciConfigByteEnable
Auto Trait Implementations§
impl Freeze for PciConfigByteEnable
impl RefUnwindSafe for PciConfigByteEnable
impl Send for PciConfigByteEnable
impl Sync for PciConfigByteEnable
impl Unpin for PciConfigByteEnable
impl UnsafeUnpin for PciConfigByteEnable
impl UnwindSafe for PciConfigByteEnable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> MeshField for T
impl<T> MeshField for T
§impl<T> MeshPayload for T
impl<T> MeshPayload for T
§impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
Computes the message size, as in [
MessageEncode::compute_message_size].§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
Writes the message, as in [
MessageEncode::write_message].