Задачи на traits в Rust. Часть 4
Сделайте plugin system через traits.
Дан trait:
trait Repository { fn find(&self, id: u64) -> Option<User>; }
Сделайте InMemoryRepo.
Trait objects lifetime (concept).
Generic impl with trait bounds.
Trait alias (concept).
Async trait (concept).
Дан trait:
trait Validate { fn validate(&self) -> Result<(), String>; }
Validate User struct.
Orphan rule explanation + newtype.
Trait for extension-like behavior.