Using generic data types in Rust