pub struct GpadlRingMem { /* private fields */ }Expand description
An implementation of [vmbus_ring::RingMem] backed by an aligned GPADL
view.
Implementations§
Source§impl GpadlRingMem
impl GpadlRingMem
Sourcepub fn new(
gpadl: AlignedGpadlView,
mem: &GuestMemory,
) -> Result<Self, GuestMemoryError>
pub fn new( gpadl: AlignedGpadlView, mem: &GuestMemory, ) -> Result<Self, GuestMemoryError>
Creates a new ring memory backed by gpadl and mem.
Trait Implementations§
Source§impl Debug for GpadlRingMem
impl Debug for GpadlRingMem
Source§impl RingMem for GpadlRingMem
impl RingMem for GpadlRingMem
Source§fn read_at(&self, addr: usize, data: &mut [u8])
fn read_at(&self, addr: usize, data: &mut [u8])
Reads from the data portion of the ring, wrapping (once) at the end of
the ring. Precondition:
addr + data.len() <= self.len() * 2.Source§fn write_at(&self, addr: usize, data: &[u8])
fn write_at(&self, addr: usize, data: &[u8])
Writes to the data portion of the ring, wrapping (once) at the end of
the ring. Precondition:
addr + data.len() <= self.len() * 2.Source§fn read_aligned(&self, addr: usize, data: &mut [u8])
fn read_aligned(&self, addr: usize, data: &mut [u8])
Reads from the data portion of the ring, as in [
RingMem::read_at]. addr and
data.len() must be multiples of 8. Read moreAuto Trait Implementations§
impl Freeze for GpadlRingMem
impl !RefUnwindSafe for GpadlRingMem
impl Send for GpadlRingMem
impl Sync for GpadlRingMem
impl Unpin for GpadlRingMem
impl UnsafeUnpin for GpadlRingMem
impl !UnwindSafe for GpadlRingMem
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