pub struct DmaAlignedMut<'a, T>(/* private fields */)
where
T: ?Sized;unstable only.Expand description
A mutable reference to an InternalMemory object.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Implementations§
Source§impl<'a, T: ?Sized> DmaAlignedMut<'a, T>
impl<'a, T: ?Sized> DmaAlignedMut<'a, T>
Sourcepub fn new(ptr: &'a mut T) -> Result<Self, DmaBufError>
pub fn new(ptr: &'a mut T) -> Result<Self, DmaBufError>
Creates a new DmaAlignedMut from a mutable variable, if it’s
provably compatible.
In internal memory, the address and size of the variable must be at least 64 byte aligned.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub const unsafe fn new_unchecked(ptr: &'a mut T) -> Self
pub const unsafe fn new_unchecked(ptr: &'a mut T) -> Self
Creates a new DmaAlignedMut from any mutable slice.
§Safety
The caller must ensure that the reference is properly aligned for the memory region it occupies and the cachelines occupied by the reference do not overlap with any other data that can be corrupted by a cacheline invalidation operation.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn writeback(&mut self)
pub fn writeback(&mut self)
Writes back the data from the cache to memory.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn invalidate(&self)
pub fn invalidate(&self)
Invalidates the cache lines for this data.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn into_inner(self) -> &'a mut T
pub fn into_inner(self) -> &'a mut T
Converts this object into a mutable reference.
Sourcepub fn reborrow<'b>(&'b mut self) -> DmaAlignedMut<'b, T>
pub fn reborrow<'b>(&'b mut self) -> DmaAlignedMut<'b, T>
Reborrows this object with a different lifetime.
Source§impl<'a, T, const N: usize> DmaAlignedMut<'a, [T; N]>
impl<'a, T, const N: usize> DmaAlignedMut<'a, [T; N]>
Sourcepub fn unsize(self) -> DmaAlignedMut<'a, [T]>
pub fn unsize(self) -> DmaAlignedMut<'a, [T]>
Converts this object into a slice reference.
Trait Implementations§
Source§impl<'a, T> Debug for DmaAlignedMut<'a, T>where
T: ?Sized + Debug,
impl<'a, T> Debug for DmaAlignedMut<'a, T>where
T: ?Sized + Debug,
Source§impl<'a, T: ?Sized> Deref for DmaAlignedMut<'a, T>
impl<'a, T: ?Sized> Deref for DmaAlignedMut<'a, T>
Auto Trait Implementations§
impl<'a, T> !UnwindSafe for DmaAlignedMut<'a, T>
impl<'a, T> Freeze for DmaAlignedMut<'a, T>where
&'a mut T: Freeze,
T: ?Sized,
impl<'a, T> RefUnwindSafe for DmaAlignedMut<'a, T>where
&'a mut T: RefUnwindSafe,
T: ?Sized,
impl<'a, T> Send for DmaAlignedMut<'a, T>where
&'a mut T: Send,
T: ?Sized,
impl<'a, T> Sync for DmaAlignedMut<'a, T>where
&'a mut T: Sync,
T: ?Sized,
impl<'a, T> Unpin for DmaAlignedMut<'a, T>where
&'a mut T: Unpin,
T: ?Sized,
impl<'a, T> UnsafeUnpin for DmaAlignedMut<'a, T>where
&'a mut T: UnsafeUnpin,
T: ?Sized,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> CryptoRng for Twhere
T: DerefMut,
<T as Deref>::Target: CryptoRng,
impl<R> CryptoRng for Rwhere
R: TryCryptoRng<Error = Infallible> + ?Sized,
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<P, T> Receiver for Pwhere
P: Deref<Target = T> + ?Sized,
T: ?Sized,
impl<P, T> Receiver for Pwhere
P: Deref<Target = T> + ?Sized,
T: ?Sized,
impl<R> RngCore for Rwhere
R: Rng,
impl<R> TryCryptoRng for Rwhere
R: CryptoRng + ?Sized,
impl<R> TryCryptoRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryCryptoRng,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
§impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
Source§impl<R> TryRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryRng,
impl<R> TryRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryRng,
Source§type Error = <<R as Deref>::Target as TryRng>::Error
type Error = <<R as Deref>::Target as TryRng>::Error
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>
u64.Source§fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>
fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>
dst entirely with random data.Source§impl<R> TryRngCore for Rwhere
R: RngCore + ?Sized,
impl<R> TryRngCore for Rwhere
R: RngCore + ?Sized,
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
u64.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
dest entirely with random data.Source§fn unwrap_err(self) -> UnwrapErr<Self>where
Self: Sized,
fn unwrap_err(self) -> UnwrapErr<Self>where
Self: Sized,
UnwrapErr wrapper.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
UnwrapMut wrapper.