Struct dma_boom::MappedDmaBuf
source · pub(crate) struct MappedDmaBuf<T> {
pub(crate) buf: T,
pub(crate) len: usize,
pub(crate) mmap: *mut u8,
}
Expand description
A DmaBuf
mapped in memory.
This uses an arbitrary T, even though the only 2 types possible are &DmaBuf and &mut DmaBuf, but Rust doesn’t provide a generic over mutability.
The mutability makes a difference with &DmaBuf: that one can be mapped multiple times in independent places.
Fields§
§buf: T
§len: usize
§mmap: *mut u8
Implementations§
source§impl MappedDmaBuf<&mut DmaBuf>
impl MappedDmaBuf<&mut DmaBuf>
pub(crate) fn as_slice_mut(&mut self) -> &mut [u8] ⓘ
Trait Implementations§
source§impl<T: Debug> Debug for MappedDmaBuf<T>
impl<T: Debug> Debug for MappedDmaBuf<T>
Auto Trait Implementations§
impl<T> Freeze for MappedDmaBuf<T>where
T: Freeze,
impl<T> RefUnwindSafe for MappedDmaBuf<T>where
T: RefUnwindSafe,
impl<T> !Send for MappedDmaBuf<T>
impl<T> !Sync for MappedDmaBuf<T>
impl<T> Unpin for MappedDmaBuf<T>where
T: Unpin,
impl<T> UnwindSafe for MappedDmaBuf<T>where
T: UnwindSafe,
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