|
rstd 0.1.0
|
A pinned pointer that guarantees the pointee will not be moved, analogous to Rust's Pin<P>.
More...
Static Public Member Functions | |
| static Pin | make (Ptr p) noexcept(mtp::noex_move< Ptr >||mtp::triv_copy< Ptr >) |
| Pins a pointer, asserting that the pointee satisfies pinning requirements. | |
| static constexpr Pin | make_unchecked (Ptr p) noexcept(mtp::noex_move< Ptr >||mtp::triv_copy< Ptr >) |
Constructs a Pin without verifying pinning guarantees (unsafe). | |
| static constexpr Ptr | into_inner_unchecked (Pin p) noexcept(mtp::noex_move< Ptr >) |
Unwraps the Pin, returning the inner pointer (unsafe). | |
A pinned pointer that guarantees the pointee will not be moved, analogous to Rust's Pin<P>.
Pinning prevents the pointee from being moved out of its location in memory, which is required for self-referential types and certain async patterns.
| Ptr | The pointer type being pinned (e.g., mut_ptr<T>, a smart pointer). |
|
inlinestaticconstexprexportnoexcept |
Unwraps the Pin, returning the inner pointer (unsafe).
| p | The pinned pointer to unwrap. |
|
inlinestaticexportnoexcept |
Pins a pointer, asserting that the pointee satisfies pinning requirements.
| p | The pointer to pin. |
Pin wrapping the pointer.
|
inlinestaticconstexprexportnoexcept |