Skip to main content

PinnableSubplace

Trait PinnableSubplace 

Source
pub unsafe trait PinnableSubplace: Subplace {
    type StructualPinning<H: PlaceHandle<Target = Self::Target>>: PlaceHandle<Target = Self::Target>;

    // Required method
    unsafe fn from_pinned<H: PlaceHandle<Target = Self::Target>>(
        handle: H,
    ) -> Self::StructualPinning<H>;
}

Required Associated Types§

Source

type StructualPinning<H: PlaceHandle<Target = Self::Target>>: PlaceHandle<Target = Self::Target>

The structural pinnedness of this subplace.

Must be exactly one of these two GATs:

  • H (i.e. the identity GAT)
  • PinnedHandle<H>

Required Methods§

Source

unsafe fn from_pinned<H: PlaceHandle<Target = Self::Target>>( handle: H, ) -> Self::StructualPinning<H>

  • If StructualPinning<H> == H, then this should be the identity function.
  • If StructualPinning<H> == PinnedHandle<H>, then this should be PinnedHandle::new_unchecked.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§