Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rough destruct_into_heads function #105

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erikjohnston
Copy link

A rough implementation of #104.

Adds:

  • a new struct OwnedTailFields which is a struct that contains all tail fields.
  • a new method fn destruct_into_heads<R>(self, user: impl for<'this> FnOnce(OwnedTailFields<'this>) -> R) -> (R, Heads).

This allows calling functions on borrowed fields that take self. See the example for... an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant