Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.md | D | 03-May-2024 | 1.4 KiB | 40 | 26 | |
enum-default-expanded.rs | D | 03-May-2024 | 3.1 KiB | 102 | 59 | |
enum-default.rs | D | 03-May-2024 | 216 | 14 | 8 | |
not_unpin-expanded.rs | D | 03-May-2024 | 4 KiB | 126 | 74 | |
not_unpin.rs | D | 03-May-2024 | 342 | 18 | 11 | |
pinned_drop-expanded.rs | D | 03-May-2024 | 5.1 KiB | 155 | 87 | |
pinned_drop.rs | D | 03-May-2024 | 412 | 24 | 16 | |
project_replace-expanded.rs | D | 03-May-2024 | 5.2 KiB | 157 | 100 | |
project_replace.rs | D | 03-May-2024 | 223 | 15 | 9 | |
struct-default-expanded.rs | D | 03-May-2024 | 5.4 KiB | 156 | 77 | |
struct-default.rs | D | 03-May-2024 | 206 | 15 | 9 | |
unsafe_unpin-expanded.rs | D | 03-May-2024 | 3.2 KiB | 108 | 66 | |
unsafe_unpin.rs | D | 03-May-2024 | 294 | 17 | 10 |
README.md
1# Examples and generated code of each feature of pin-project 2 3### Basic usage of `#[pin_project]` on structs 4 5- [example](struct-default.rs) 6- [generated code](struct-default-expanded.rs) 7 8### Basic usage of `#[pin_project]` on enums 9 10- [example](enum-default.rs) 11- [generated code](enum-default-expanded.rs) 12 13### Manual implementation of `Unpin` by `UnsafeUnpin` 14 15- [example](unsafe_unpin.rs) 16- [generated code](unsafe_unpin-expanded.rs) 17- [`UnsafeUnpin` documentation](https://docs.rs/pin-project/1/pin_project/trait.UnsafeUnpin.html) 18 19### Manual implementation of `Drop` by `#[pinned_drop]` 20 21- [example](pinned_drop.rs) 22- [generated code](pinned_drop-expanded.rs) 23- [`#[pinned_drop]` documentation](https://docs.rs/pin-project/1/pin_project/attr.pinned_drop.html) 24 25### `project_replace()` method 26 27- [example](project_replace.rs) 28- [generated code](project_replace-expanded.rs) 29- [`project_replace()` documentation](https://docs.rs/pin-project/1/pin_project/attr.pin_project.html#project_replace-method) 30 31### Ensure `!Unpin` by `#[pin_project(!Unpin)]` 32 33- [example](not_unpin.rs) 34- [generated code](not_unpin-expanded.rs) 35- [`!Unpin` documentation](https://docs.rs/pin-project/1/pin_project/attr.pin_project.html#unpin) 36 37Note: These generated code examples are the little simplified version of the 38actual generated code. See [expansion tests](../tests#expansion-tests-expand-expandtestrs) if you 39want to see the exact version of the actual generated code. 40