tree: 9abbab201ed628e15973c759ac9b5704762a2c3a [path history] [tgz]
  1. enum-default-expanded.rs
  2. enum-default.rs
  3. not_unpin-expanded.rs
  4. not_unpin.rs
  5. pinned_drop-expanded.rs
  6. pinned_drop.rs
  7. project_replace-expanded.rs
  8. project_replace.rs
  9. README.md
  10. struct-default-expanded.rs
  11. struct-default.rs
  12. unsafe_unpin-expanded.rs
  13. unsafe_unpin.rs
examples/README.md

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.