Advertisement
cwchen

[Rust] Ball class, which implements Shape trait

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