struct
How to clone a struct storing a boxed trait object?
There are a few problems. The first is that there’s nothing to require that an Animal also implements Clone. You could fix this by changing the trait definition: trait Animal: Clone { /* … */ } This would cause Animal to no longer be object safe, meaning that Box<dyn Animal> will become invalid, so that’s … Read more