pub struct ContiguousBox<T: DmaPod> { /* private fields */ }Implementations§
Source§impl<T: DmaPod> ContiguousBox<T>
impl<T: DmaPod> ContiguousBox<T>
pub fn dma_addr(&self) -> DmaAddr
pub fn read_cpu(&self) -> T
pub fn write_cpu(&mut self, value: T)
pub fn modify_cpu(&mut self, f: impl FnOnce(&mut T))
pub fn sync_for_device_all(&self)
pub fn sync_for_cpu_all(&self)
pub fn prepare_for_device_all(&self)
pub fn complete_for_cpu_all(&self)
pub fn write_for_device(&mut self, value: T)
pub fn modify_for_device(&mut self, f: impl FnOnce(&mut T))
pub fn read_from_device(&self) -> T
pub fn as_ptr(&self) -> NonNull<T>
Sourcepub unsafe fn as_bytes_mut_cpu(&mut self) -> &mut [u8] ⓘ
pub unsafe fn as_bytes_mut_cpu(&mut self) -> &mut [u8] ⓘ
§Safety
The caller must ensure the device is not concurrently accessing this memory in a way that races with CPU writes.
Trait Implementations§
impl<T: DmaPod + Send> Send for ContiguousBox<T>
impl<T: DmaPod + Sync> Sync for ContiguousBox<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ContiguousBox<T>
impl<T> !UnwindSafe for ContiguousBox<T>
impl<T> Freeze for ContiguousBox<T>
impl<T> Unpin for ContiguousBox<T>where
T: Unpin,
impl<T> UnsafeUnpin for ContiguousBox<T>
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