pub struct AlignedBuffer<const N: usize> { /* private fields */ }Expand description
Aligned buffer for DMA or hardware access
Implementations§
Source§impl<const N: usize> AlignedBuffer<N>
impl<const N: usize> AlignedBuffer<N>
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Get a mutable slice of the buffer
Sourcepub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Get the mutable buffer pointer
Sourcepub fn verify_alignment(&self) -> bool
pub fn verify_alignment(&self) -> bool
Verify the buffer is properly aligned
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for AlignedBuffer<N>
impl<const N: usize> RefUnwindSafe for AlignedBuffer<N>
impl<const N: usize> Send for AlignedBuffer<N>
impl<const N: usize> Sync for AlignedBuffer<N>
impl<const N: usize> Unpin for AlignedBuffer<N>
impl<const N: usize> UnsafeUnpin for AlignedBuffer<N>
impl<const N: usize> UnwindSafe for AlignedBuffer<N>
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