We read the following definition as: the function largest is generic
over some type T. This function has one parameter named list, which is a
slice of values of type T. The largest function will return a reference
to a value of the same type T.
Struct definitions
A struct can also have multiple generic types:
Enum Definitions
And again with multiple generics:
Method Definitions
And again with multiple generics:
Performance of Code Using Generics
The Rust compiler is very very clever and using generics has no
performance penalty