mortimer.nl
My personal website.
articles
starting a company
things with names
more about me
fn main() {
let me = Person::new("Mathijs");
me.whoami();
}
struct Person {
name: &'static str,
}
impl Person {
fn new(name: &'static str) -> Self {
Self { name }
}
fn whoami(&self) {
println!("Hi, I'm {}!", self.name);
}
}
