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<'_>
impl PortBottom<'_>
Sourcepub async fn outbound(&mut self) -> (&[u8], Eid)
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.
Sourcepub fn try_outbound(&mut self) -> Option<(&[u8], Eid)>
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.
Sourcepub fn outbound_done(&mut self)
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> 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