In this video tutorial, we look at two fairly interesting concepts in the Rust programming language, Generic types and Traits. Traits allow us to define behavior across multiple data structures and types. This can be handy when we are dealing with behavior that is very common in programming and it can be useful for overloading basic operators and functions that already exist in the rust language. Generic types or Generics are a method of generalizing the type declarations to allow for a dynamic type of polymorphic data or behavior. We can use generics to decrease the amount of code reuse dramatically by generalizing what are data will look like and what the methods and functions can handle. We can also combine these two concepts to create much more bounded functions and methods which are specific to groups of types on their inputs and outputs which further pushes the theme of safety in the Rust language.
If you enjoy the video, feel free to follow me on Steemit or on YouTube to get updates on the channel.