pub enum ReplyChain<M: MemOps> {
Writable(WritableChain<M>),
Ack(AckChain),
}Expand description
Consumer-side chain reply, either writable or ack-only.
Created by VirtqConsumer::poll. Must be submitted back via
VirtqConsumer::complete to release the descriptor.
Variants§
Writable(WritableChain<M>)
Reply with writable buffer capacity.
Use the write* methods on WritableChain to fill the
response buffer.
Ack(AckChain)
Ack-only reply (for chains with only readable buffers). No response buffer.
Just pass back to VirtqConsumer::complete to acknowledge.
Implementations§
Source§impl<M: MemOps> ReplyChain<M>
impl<M: MemOps> ReplyChain<M>
Sourcepub fn into_writable(self) -> Result<WritableChain<M>, AckChain>
pub fn into_writable(self) -> Result<WritableChain<M>, AckChain>
Convert into the writable form.
Returns the AckChain unchanged as Err for ack-only replies, so the
completion capability is never silently dropped.
Trait Implementations§
Source§impl<M: MemOps> From<WritableChain<M>> for ReplyChain<M>
impl<M: MemOps> From<WritableChain<M>> for ReplyChain<M>
Source§fn from(wc: WritableChain<M>) -> Self
fn from(wc: WritableChain<M>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<M> Freeze for ReplyChain<M>where
M: Freeze,
impl<M> RefUnwindSafe for ReplyChain<M>where
M: RefUnwindSafe,
impl<M> Send for ReplyChain<M>where
M: Send,
impl<M> Sync for ReplyChain<M>where
M: Sync,
impl<M> Unpin for ReplyChain<M>where
M: Unpin,
impl<M> UnsafeUnpin for ReplyChain<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for ReplyChain<M>where
M: UnwindSafe,
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