Skip to main content

FlitOhcA

Struct FlitOhcA 

Source
pub struct FlitOhcA {
    pub pasid: u32,
    pub fdwbe: u8,
    pub ldwbe: u8,
}
Expand description

Parsed OHC-A word — the byte layout is shared by OHC-A1, OHC-A2, and OHC-A3.

OHC-A word byte layout (4 bytes, on-wire order):

Byte 0: flags[7:4] | PASID[19:16]
Byte 1: PASID[15:8]
Byte 2: PASID[7:0]
Byte 3: ldwbe[7:4] | fdwbe[3:0]

Use FlitOhcA::from_bytes to parse from a byte slice that starts at the first byte of the OHC-A word (i.e. at offset base_header_dw * 4 in the TLP).

Fields§

§pasid: u32

20-bit PASID value extracted from bytes 0–2.

§fdwbe: u8

First DW byte enables (bits [3:0] of byte 3).

§ldwbe: u8

Last DW byte enables (bits [7:4] of byte 3).

Implementations§

Source§

impl FlitOhcA

Source

pub fn from_bytes(b: &[u8]) -> Result<Self, TlpError>

Parse one OHC-A word from the first 4 bytes of b.

Returns Err(TlpError::InvalidLength) if b.len() < 4.

Trait Implementations§

Source§

impl Clone for FlitOhcA

Source§

fn clone(&self) -> FlitOhcA

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FlitOhcA

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FlitOhcA

Source§

fn eq(&self, other: &FlitOhcA) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for FlitOhcA

Source§

impl StructuralPartialEq for FlitOhcA

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.