by tome · 6y ago · 0 comments
Perhaps gpderetta said it better: https://news.ycombinator.com/item?id=23537639
Edit: Assuming we're talking about objects that can be grouped into some sort of 'classes'.
(This is basically why Rust doesn't support multi-trait types (e.g. &dyn Debug + Clone)
trait Foo: Debug + Clone {}
Edit: No you can't, because `Clone` requires `Sized`, which means you can't make a trait object of `Foo`.https://play.rust-lang.org/?version=stable&mode=debug&editio...