pub struct Owned<P> { /* private fields */ }Expand description
The Owned generic type of an SGTable.
A SGTable<Owned> signifies that the SGTable owns all associated resources:
- The backing memory pages.
- The
struct sg_tableallocation (sgt). - The DMA mapping, managed through a
Devres-managedDmaMappedSgt.
Users interact with this type through the SGTable handle and do not need to manage
Owned directly.
Implementations§
Source§impl<P> Owned<P>
impl<P> Owned<P>
Sourcepub fn project<'__this>(
self: Pin<&'__this mut Self>,
) -> __Projection<'__this, P>
pub fn project<'__this>( self: Pin<&'__this mut Self>, ) -> __Projection<'__this, P>
Pin-projects all fields of Self.
These fields are structurally pinned:
dma
These fields are not structurally pinned:
sgt_pages
Sourcepub fn with_project<'__this, R>(
self: Pin<&'__this mut Self>,
f: impl FnOnce(__ProjectionLt<'__this, P>) -> R,
) -> R
pub fn with_project<'__this, R>( self: Pin<&'__this mut Self>, f: impl FnOnce(__ProjectionLt<'__this, P>) -> R, ) -> R
Pin-projects all fields of Self with proper lifetime.
These fields are structurally pinned:
dma
These fields are not structurally pinned:
sgt_pages
Sourcepub fn with_project_ref<'__this, R>(
self: Pin<&'__this Self>,
f: impl FnOnce(__ProjectionRef<'__this, P>) -> R,
) -> R
pub fn with_project_ref<'__this, R>( self: Pin<&'__this Self>, f: impl FnOnce(__ProjectionRef<'__this, P>) -> R, ) -> R
Pin-projects all fields of Self from a shared reference with proper lifetime.
These fields are structurally pinned:
dma
These fields are not structurally pinned:
sgt_pages
Trait Implementations§
impl<P: Send> Send for Owned<P>
impl<P: Sync> Sync for Owned<P>
Auto Trait Implementations§
impl<P> !Freeze for Owned<P>
impl<P> !RefUnwindSafe for Owned<P>
impl<P> !UnsafeUnpin for Owned<P>
impl<P> !UnwindSafe for Owned<P>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
Source§fn into_safe_cast(self) -> T
fn into_safe_cast(self) -> T
Convert
self into a T. This operation is guaranteed to be lossless.Source§impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
Source§fn into_safe_cast_arch(self) -> T
fn into_safe_cast_arch(self) -> T
Convert
self into a T. This operation is guaranteed to be lossless.