rust vec of generics types
trait Foo { }
pub struct A {}
pub struct B {}
impl Foo for A {}
impl Foo for B {}
type FooT = Box<dyn Foo>;
fn test() -> Vec<FooT> {
let mut generic_vec: Vec<FooT> = Vec::new();
generic_vec.push(Box::new(A {}));
generic_vec.push(Box::new(B {}));
return generic_vec;
}