Registry / async / pin-project-lite

pin-project-lite

JSON →
library0.2.17rscratesunverified

A lightweight version of pin-project written with declarative macros.

# Cargo.toml [dependencies] pin-project-lite = "0.2.17"
INSTALL
IMPORT
SIG · PIN-PROJECT-LITE
P
pin-project-lite
asyncrustv0.2.17
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_lite::pin_project;

Define a pinned struct with safe pin projections using the pin_project macro.

use pin_project_lite::pin_project; pin_project! { struct Wrapper<T> { #[pin] inner: T, } } fn main() { let wrapper = Wrapper { inner: 42 }; let pinned = Box::pin(wrapper); println!("Pinned value: {}", pinned.as_ref().project_ref().inner); }
Debug
Known issues
gotchaRequires careful handling of pin projections to avoid unsoundness
fix
Always use #[pin] attribute on fields that should be pinned; avoid manual unsafe pin projections
affects: >=0.2.0
Upgrade
Version history
0.2.17latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
26
Resources
pin-project-lite — cargo add pin-project-lite · libregistry