1 2 3 4 5 6 7 8 9 10 11 12 13
pub struct Updater { } impl Updater { pub fn new() -> Self { Updater {} } pub fn update(&self) { println!("Updating"); } }