trait Say {
    fn say(&self);
}

struct Dog {}

impl Say for Dog {
    fn say(&self) {
        println!("Wangwang!");
    }
}

fn do_say(s: Box<dyn Say>) {
    s.say();
}

fn main() {
    let dog = Dog {};
    do_say(Box::new(dog));
}