Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Parent trait
- pub trait Color {
- fn color<'a>(&self) -> &'a str;
- }
- // Parent trait
- pub trait Shape {
- fn shape<'a>(&self) -> &'a str;
- }
- // Child trait
- pub trait Item: Color + Shape {
- fn name<'a>(&self) -> &'a str;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement