2 ms·
On reflection I think they were referring to both traits and trait objects instead (“Call tables”). I don’t know what more you can ask for than the Rust Book’s
by cormacrelf 6y ago
On reflection I think they were referring to both traits and trait objects instead (“Call tables”). I don’t know what more you can ask for than the Rust Book’s entry on trait objects. Not sure how you get “immature language” from this page:
https://doc.rust-lang.org/book/ch17-02-trait-objects.html https://doc.rust-lang.org/book/ch17-02-trait-objects.html
- steveklabnik 6y agoTrait objects are kind of a pain and there are some improvements that could be made there. Here's a random example: if you want a trait object with more than one trait, that only works today if one of the two is an auto trait: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=49039ad3198d4162eddc932c98a0f50b https://play.rust-lang.org/?version=stable&mode=debug&editio...