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

RFC: DynTrait and VTable #2579

Closed
wants to merge 1 commit into from
Closed

Conversation

SimonSapin
Copy link
Contributor

Add a DynTrait trait and a VTable type to provide access to the components of a fat pointer to a trait object dyn SomeTrait, and the ability to reconstruct such a pointer from its components.

HTML view

This RFC is based on @gankro’s proposal at https://gist.github.com/Gankro/b053cb4d1cb3bcaec070de89734720f7. By the time I got it into a submittable state however, I because increasingly convinced that it would be better replaced by a more general design that would apply not just to trait objects but all pointers, with an associated type for (fat) pointer metadata. I’m submitting this as a PR anyway for posterity and comparison, but I’ll be closing it immediately.

@SimonSapin
Copy link
Contributor Author

Closing in favor of #2580.

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