2 releases
0.1.1 | Sep 21, 2024 |
---|---|
0.1.0 | Sep 21, 2024 |
#3 in #person
314 downloads per month
3KB
BOBO
an elegant and powerful rust development tool library
Quick Start
use bobo::oop::*;
class! {
Person {
name: String
age: u32
fn greet(){
println!("{}", format!("Hello, my name is {}.", self.name));
}
fn get_age(years: u32) -> u32 {
self.age + years
}
}
}
fn main() {
let person = Person {
name: String::from("Tom"),
age: 30,
};
person.greet();
println!("I am {} years old.", person.get_age(5));
}
Dependencies
~245–690KB
~17K SLoC