Skip to content

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