Skip to main content

TlpType

Enum TlpType 

Source
pub enum TlpType {
Show 21 variants MemReadReq, MemReadLockReq, MemWriteReq, IOReadReq, IOWriteReq, ConfType0ReadReq, ConfType0WriteReq, ConfType1ReadReq, ConfType1WriteReq, MsgReq, MsgReqData, Cpl, CplData, CplLocked, CplDataLocked, FetchAddAtomicOpReq, SwapAtomicOpReq, CompareSwapAtomicOpReq, DeferrableMemWriteReq, LocalTlpPrefix, EndToEndTlpPrefix,
}
Expand description

High-level TLP transaction type decoded from the DW0 Format and Type fields.

Variants§

§

MemReadReq

32-bit or 64-bit Memory Read Request.

§

MemReadLockReq

Locked Memory Read Request.

§

MemWriteReq

32-bit or 64-bit Memory Write Request.

§

IOReadReq

I/O Read Request.

§

IOWriteReq

I/O Write Request.

§

ConfType0ReadReq

Configuration Type 0 Read Request.

§

ConfType0WriteReq

Configuration Type 0 Write Request.

§

ConfType1ReadReq

Configuration Type 1 Read Request.

§

ConfType1WriteReq

Configuration Type 1 Write Request.

§

MsgReq

Message Request (no data).

§

MsgReqData

Message Request with data payload.

§

Cpl

Completion without data.

§

CplData

Completion with data.

§

CplLocked

Locked Completion without data.

§

CplDataLocked

Locked Completion with data.

§

FetchAddAtomicOpReq

Fetch-and-Add AtomicOp Request.

§

SwapAtomicOpReq

Unconditional Swap AtomicOp Request.

§

CompareSwapAtomicOpReq

Compare-and-Swap AtomicOp Request.

§

DeferrableMemWriteReq

Deferrable Memory Write Request.

§

LocalTlpPrefix

Local TLP Prefix.

§

EndToEndTlpPrefix

End-to-End TLP Prefix.

Implementations§

Source§

impl TlpType

Source

pub fn is_non_posted(&self) -> bool

Returns true for non-posted TLP types (requests that expect a Completion).

Non-posted transactions include memory reads, I/O, configuration, atomics, and Deferrable Memory Write. Posted writes (MemWriteReq, messages) return false.

Source

pub fn is_posted(&self) -> bool

Returns true for posted TLP types (no Completion expected).

Convenience inverse of TlpType::is_non_posted.

§Examples
use rtlp_lib::TlpType;

assert!(TlpType::MemWriteReq.is_posted());    // posted write
assert!(TlpType::MsgReq.is_posted());         // message
assert!(!TlpType::MemReadReq.is_posted());    // non-posted

Trait Implementations§

Source§

impl Debug for TlpType

Source§

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

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

impl Display for TlpType

Source§

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

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

impl PartialEq for TlpType

Source§

fn eq(&self, other: &TlpType) -> 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 StructuralPartialEq for TlpType

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.