Skip to content

Instantly share code, notes, and snippets.

@TheOpenDevProject
Created November 8, 2015 11:27
Show Gist options
  • Save TheOpenDevProject/07adcb8fb923a755cb2c to your computer and use it in GitHub Desktop.
Save TheOpenDevProject/07adcb8fb923a755cb2c to your computer and use it in GitHub Desktop.
trait MyInterface {
fn say_something(&self);
}
impl MyInterface for Hello{
fn say_something(&self) {
println!("Hello World");
}
}
fn main(){
let x = Hello;
x.say_something();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment