1
0
Fork 0
firefox/third_party/rust/pin-project/examples
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00
..
enum-default-expanded.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
enum-default.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
not_unpin-expanded.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
not_unpin.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
pinned_drop-expanded.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
pinned_drop.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
project_replace-expanded.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
project_replace.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
README.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
struct-default-expanded.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
struct-default.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
unsafe_unpin-expanded.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
unsafe_unpin.rs Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00

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.