pub struct DmaBuffer<const N: usize> { /* private fields */ }Expand description
DMA buffer aligned to OS page boundaries (4096 bytes).
Required for O_DIRECT (Linux) and FILE_FLAG_NO_BUFFERING (Windows) to ensure the NVMe controller can DMA directly into the buffer without kernel intervention.
Implementations§
Source§impl<const N: usize> DmaBuffer<N>
impl<const N: usize> DmaBuffer<N>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new zero-initialized DMA buffer.
§Panics
Panics if N is not a multiple of PAGE_SIZE (4096).
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Returns the buffer as a mutable byte slice.
Sourcepub fn f64_capacity(&self) -> usize
pub fn f64_capacity(&self) -> usize
Returns the number of f64 values this buffer can hold.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for DmaBuffer<N>
impl<const N: usize> RefUnwindSafe for DmaBuffer<N>
impl<const N: usize> Send for DmaBuffer<N>
impl<const N: usize> Sync for DmaBuffer<N>
impl<const N: usize> Unpin for DmaBuffer<N>
impl<const N: usize> UnsafeUnpin for DmaBuffer<N>
impl<const N: usize> UnwindSafe for DmaBuffer<N>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.