pub struct WritableChain<M: MemOps> { /* private fields */ }Expand description
Implementations§
Source§impl<M: MemOps> WritableChain<M>
impl<M: MemOps> WritableChain<M>
Sourcepub fn write(&mut self, buf: &[u8]) -> Result<usize, VirtqError>
pub fn write(&mut self, buf: &[u8]) -> Result<usize, VirtqError>
Write bytes into writable buffers, returning how many were written.
Appends at the current write position. If buf is larger than the
remaining capacity, writes as many bytes as will fit (partial write).
Segmentation is intentionally hidden; host-side writes must go through
MemOps::write.
§Errors
VirtqError::MemoryWriteError- underlying MemOps write failed
Sourcepub fn write_all(&mut self, buf: &[u8]) -> Result<&mut Self, VirtqError>
pub fn write_all(&mut self, buf: &[u8]) -> Result<&mut Self, VirtqError>
Write the entire buffer or return an error.
§Errors
VirtqError::ReplyTooLarge- buf exceeds remaining capacityVirtqError::MemoryWriteError- underlying MemOps write failed
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 WritableChain<M>where
M: Freeze,
impl<M> RefUnwindSafe for WritableChain<M>where
M: RefUnwindSafe,
impl<M> Send for WritableChain<M>where
M: Send,
impl<M> Sync for WritableChain<M>where
M: Sync,
impl<M> Unpin for WritableChain<M>where
M: Unpin,
impl<M> UnsafeUnpin for WritableChain<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for WritableChain<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