Wait, but that's consistent. Box<T> where T: Trait doesn't implement Trait. Box<dyn T> doesn't either. Both pass methods down.
Yes. It points to a vtable with the size information and function pointers to all the trait methods
-
-
but a `dyn Trait` cannot exist as a value on its own? it needs a wrapper type to implement a pointer to the concrete value?
-
Correct. Something has to actually point to that vtable and size information.
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.