Registry / async / pin-project

pin-project

JSON →
library1.1.13rscratesunverified

A crate for safe and ergonomic pin-projection.

# Cargo.toml [dependencies] pin-project = "1.1.13"
INSTALL
IMPORT
SIG · PIN-PROJECT
P
pin-project
asyncrustv1.1.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pin_project
use pin_project::pin_project;

Use pin_project attribute to safely project pinned fields.

use pin_project::pin_project; use std::pin::Pin; #[pin_project] struct MyStruct { #[pin] field: u32, } fn main() { let s = MyStruct { field: 42 }; let pinned = Box::pin(s); let projected = pinned.as_ref().project(); println!("{}", *projected.field); }
Debug
Known issues
gotchaUsing #[pin] on a field that is not Unpin can cause unsoundness if not careful.
fix
Ensure the field type is Unpin or use #[pin] only when necessary.
affects: >=1.0.0
Upgrade
Version history
1.1.13latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
pin-project — cargo add pin-project · libregistry