pub struct CoherentBox<T: DmaPod> { /* private fields */ }Implementations§
Source§impl<T: DmaPod> CoherentBox<T>
impl<T: DmaPod> CoherentBox<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 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 CoherentBox<T>
impl<T: DmaPod + Sync> Sync for CoherentBox<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for CoherentBox<T>
impl<T> !UnwindSafe for CoherentBox<T>
impl<T> Freeze for CoherentBox<T>
impl<T> Unpin for CoherentBox<T>where
T: Unpin,
impl<T> UnsafeUnpin for CoherentBox<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