Задачи на ООП в Rust. Часть 10
Реализуйте два trait для одного struct: impl Debug for Employee и impl Display for Employee.
Даны traits:
trait Fly { fn fly(&self); }
trait Swim { fn swim(&self); }
Сделайте struct Duck, реализующий оба trait.
Сделайте trait Readable и Writable для struct FileWrapper.
Функция с двумя trait bounds: T: Clone + Display.
Используйте where для читаемости: fn foo<T>(x: T) where T: A + B.
Дан struct:
struct Point { x: i32, y: i32 }
Impl Add для сложения точек (std::ops).
Сделайте adapter struct, реализующий новый trait через делегирование.
Compare impl Trait vs dyn Trait for multiple traits.
Сделайте enum, реализующий общий trait для всех вариантов.
Для одной struct User реализуйте несколько trait: Display, Debug и свой trait Identifiable.