Guest User

Untitled

a guest
Apr 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. trait Command {
  2. fn exec(&mut self) where Self: Clone;
  3. }
  4.  
  5. #[derive(Clone, Default)]
  6. struct Foo;
  7.  
  8. impl Command for Foo {
  9. fn exec(&mut self) {
  10. unimplemented!();
  11. }
  12. }
  13.  
  14. fn main () {
  15. let cmd: Box<Command> = Box::new(Foo);
  16. }
Add Comment
Please, Sign In to add comment