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

Consider adding a concrete lifetime to the Visit trait #57

Open
KodrAus opened this issue Jun 28, 2021 · 1 comment
Open

Consider adding a concrete lifetime to the Visit trait #57

KodrAus opened this issue Jun 28, 2021 · 1 comment

Comments

@KodrAus
Copy link

KodrAus commented Jun 28, 2021

It looks like most of the work to support visiting borrowed data for some concrete lifetime (instead of just for any lifetime) is already done, the Visit trait just doesn't surface a lifetime that implementors can use to stash values across calls.

I at least find introducing lifetimes late in an API design can get a bit hairy so it might something to explore sooner rather than later 🙂

@KodrAus
Copy link
Author

KodrAus commented Jul 5, 2021

This may turn out to be less important for valuable once it has some pointer concept (#59) if you can logically borrow a piece of data by storing a borrow to the overall Valuable and a pointer to the specific field you want to borrow.

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

No branches or pull requests

1 participant