pub struct VirtqueueBuffer<'b> {
pub buf: &'b mut [u8],
pub len: usize,
pub device_writeable: bool,
}
Expand description
A slice of memory to be shared with a VirtIO device.
The VirtqueueBuffer
allows to limit the portion of the passed slice to
be shared with the device through the len
field. Furthermore, the device
can be asked to not write to the shared buffer by setting device_writeable
to false
.
The SplitVirtqueue
does not actually enfore that a VirtIO device adheres
to the device_writeable
flag, although compliant devices should.
Fields§
§buf: &'b mut [u8]
§len: usize
§device_writeable: bool
Auto Trait Implementations§
impl<'b> Freeze for VirtqueueBuffer<'b>
impl<'b> RefUnwindSafe for VirtqueueBuffer<'b>
impl<'b> Send for VirtqueueBuffer<'b>
impl<'b> Sync for VirtqueueBuffer<'b>
impl<'b> Unpin for VirtqueueBuffer<'b>
impl<'b> !UnwindSafe for VirtqueueBuffer<'b>
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