Advertisement
cwchen

[Rust] Orange class, which implements Color trait

Sep 4th, 2017
3,350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.11 KB | None | 0 0
  1. pub struct Orange {}
  2.  
  3. impl Color for Orange {
  4.      fn color<'a>(&self) -> &'a str {
  5.          "orange"
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement