fune/third_party/rust/pin-project/examples
..
enum-default-expanded.rs
enum-default.rs
not_unpin-expanded.rs
not_unpin.rs
pinned_drop-expanded.rs
pinned_drop.rs
project_replace-expanded.rs
project_replace.rs
README.md
struct-default-expanded.rs
struct-default.rs
unsafe_unpin-expanded.rs
unsafe_unpin.rs

Examples and generated code of each feature of pin-project

Basic usage of #[pin_project] on structs

Basic usage of #[pin_project] on enums

Manual implementation of Unpin by UnsafeUnpin

Manual implementation of Drop by #[pinned_drop]

project_replace() method

Ensure !Unpin by #[pin_project(!Unpin)]

Note: These generated code examples are the little simplified version of the actual generated code. See expansion tests if you want to see the exact version of the actual generated code.