pub struct FlatRingMem { /* private fields */ }
Expand description
An implementation of RingMem
over a flat allocation. Useful for tests.
Implementations§
Trait Implementations§
Source§impl Clone for FlatRingMem
impl Clone for FlatRingMem
Source§fn clone(&self) -> FlatRingMem
fn clone(&self) -> FlatRingMem
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FlatRingMem
impl Debug for FlatRingMem
Source§impl RingMem for FlatRingMem
impl RingMem for FlatRingMem
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 moreSource§fn write_aligned(&self, addr: usize, data: &[u8])
fn write_aligned(&self, addr: usize, data: &[u8])
Writes to the data portion of the ring, as in
RingMem::write_at
. addr
and
data.len()
must be multiples of 8. Read moreAuto Trait Implementations§
impl Freeze for FlatRingMem
impl RefUnwindSafe for FlatRingMem
impl Send for FlatRingMem
impl Sync for FlatRingMem
impl Unpin for FlatRingMem
impl UnwindSafe for FlatRingMem
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