You've already forked rust-tutor
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
This commit is contained in:
15
exercises/03-basic-traits/README.md
Normal file
15
exercises/03-basic-traits/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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)
|
||||
Reference in New Issue
Block a user