4 ms·
No. &mut dyn Foo is sugar for something like struct DynFoo<erase T> { vtable: &mut VTableFoo<T> ptr: &mut T } This is the underlying f
by Ericson2314 3y ago
No. &mut dyn Foo is sugar for something like
struct DynFoo<erase T> {
vtable: &mut VTableFoo<T>
ptr: &mut T
}
This is the underlying feature. `dyn` is a bit of an ad-hoc hack around not having this feature.