Skip to content

Conversation

BennoLossin
Copy link
Member

@BennoLossin BennoLossin commented Jul 23, 2025

cc @Darksonn @nbdd0121

Still missing:

  • fix errors in CI
  • commit message
  • tests
  • changelog
  • example

The next commit makes the `#[pin_data]` attribute generate a `project`
function that would collide with any existing ones.

Signed-off-by: Benno Lossin <[email protected]>
@BennoLossin BennoLossin force-pushed the dev/pin-projections branch 3 times, most recently from 7312caa to a82c203 Compare August 23, 2025 21:39
Make the `#[pin_data]` macro generate a `*Projection` struct that holds
either `Pin<&mut Field>` or `&mut Field` for every field of the original
struct. Which version is chosen depends on weather there is a `#[pin]`
or not respectively. Access to this projected version is enabled through
generating `fn project(self: Pin<&mut Self>) -> SelfProjection<'_>`.

Signed-off-by: Benno Lossin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant