Understanding Generics in Rust lang