Files
rust-tutor/exercises/03-basic-traits/README.md
Reality Enjoyer 02fbf819e4 generic types, traits and lifetimes
- get claude to create rustlings style exercises based on chapter 10 of the book
- update CLAUDE.md to prevent it from producing incorrect exercises
- complete exercises/01-generic-cache-system
2026-01-22 11:58:33 +00:00

15 lines
736 B
Markdown

# Configuration System Traits
Build a configuration system where different components (database, cache, logger) can be configured uniformly. You'll define traits that allow different types to be configured, validated, and reset in a standard way.
## What you'll practice
- Defining traits that establish contracts between types
- Implementing the same trait for different struct types
- Using traits as function parameters with `impl Trait` syntax
- Creating functions that work with any type implementing specific traits
## Further information
- [Traits: Defining Shared Behavior](https://doc.rust-lang.org/book/ch10-02-traits.html)
- [Traits as Parameters](https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters)