# Lesson 9: Traits and generics Traits and generics comes up in almost every real Rust project. We start with the why, then write code together. Full lesson: [https://glibcode.net/courses/rust-ownership/lessons/9](https://glibcode.net/courses/rust-ownership/lessons/9) ## Files - `src/main.rs`: a trait, an impl and a generic function > **Tip:** `cargo check` is much faster than `cargo build` while you are still fixing errors. ## Run it ```sh cargo run ``` ## Exercises See [exercises.md](exercises.md). Ask in the forum once you've tried.