
Generics
Trait Objects in Rust and Why Some Traits Cannot Be One
A trait object is a pointer plus a vtable, which lets one Vec hold many types. See how to build one, what the cost is, and why some traits cannot be used this way.
7 min read
Tag
1 post

A trait object is a pointer plus a vtable, which lets one Vec hold many types. See how to build one, what the cost is, and why some traits cannot be used this way.