Struct PortBottom

Source
pub struct PortBottom<'a> { /* private fields */ }
Expand description

The “consumer” side of a queue of packets to send out a MCTP interface,

An MCTP transport implementation will read packets to send with outbound().

Implementations§

Source§

impl PortBottom<'_>

Source

pub async fn outbound(&mut self) -> (&[u8], Eid)

Retrieve an outbound packet to send for this port.

Should call outbound_done() to consume the packet and advance the queue. outbound() may be called multiple times to peek at the same packet. Also returns the destination EID.

Source

pub fn try_outbound(&mut self) -> Option<(&[u8], Eid)>

Attempt to retrieve an outbound packet.

This is the same as outbound() but returns None immediately if not available.

Should call outbound_done() to consume the packet and advance the queue. try_outbound() may be called multiple times to peek at the same packet.

Source

pub fn outbound_done(&mut self)

Consume the outbound packet and advance the queue.

Auto Trait Implementations§

§

impl<'a> Freeze for PortBottom<'a>

§

impl<'a> !RefUnwindSafe for PortBottom<'a>

§

impl<'a> Send for PortBottom<'a>

§

impl<'a> Sync for PortBottom<'a>

§

impl<'a> Unpin for PortBottom<'a>

§

impl<'a> !UnwindSafe for PortBottom<'a>

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, 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.