Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait Command {
- fn exec(&mut self) where Self: Clone;
- }
- #[derive(Clone, Default)]
- struct Foo;
- impl Command for Foo {
- fn exec(&mut self) {
- unimplemented!();
- }
- }
- fn main () {
- let cmd: Box<Command> = Box::new(Foo);
- }
Add Comment
Please, Sign In to add comment