pub struct RecvChain { /* private fields */ }Expand description
Payload received from the producer, safely copied out of shared memory.
Created by VirtqConsumer::poll. Device-readable segments are eagerly
copied during poll using MemOps::read (volatile on the host side), so
accessing data requires no unsafe code and no references into shared
memory. Segment boundaries are preserved in Segments.
Implementations§
Source§impl RecvChain
impl RecvChain
Sourcepub fn into_segments(self) -> Segments
pub fn into_segments(self) -> Segments
Consume the chain, taking ownership of the segments.
Sourcepub fn to_bytes(&self) -> Bytes
pub fn to_bytes(&self) -> Bytes
Return the chain payload as contiguous bytes.
Returns empty Bytes when the chain has no readable buffers.
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Consume the chain and return the payload as contiguous bytes.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RecvChain
impl RefUnwindSafe for RecvChain
impl Send for RecvChain
impl Sync for RecvChain
impl Unpin for RecvChain
impl UnsafeUnpin for RecvChain
impl UnwindSafe for RecvChain
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