Just some stuff about me.
Here's my dotfiles repository.
What links here:
Trait object:
dyn SomeTrait
does not implement Sized
)You cannot use multiple non-auto traits for a trait object: you would need two pointers to two vtables. A workaround is to create a new trait with the two as bounds to combine vtables, then a blanket impl impl<T: Trait + Trait2> Trait3 for T {}
, and use that in the trait object. Then you can add casting methods to get the other traits.
https://github.com/pretzelhammer/rust-blog/blob/master/posts/sizedness-in-rust.md