mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-15 14:27:50 +02:00
32 lines
533 B
Rust
32 lines
533 B
Rust
pub struct User {
|
|
name: String,
|
|
age: u32,
|
|
weight: f32,
|
|
}
|
|
|
|
impl User {
|
|
pub fn new(name: String, age: u32, weight: f32) -> Self {
|
|
unimplemented!()
|
|
}
|
|
|
|
pub fn name(&self) -> &str {
|
|
unimplemented!()
|
|
}
|
|
|
|
pub fn age(&self) -> u32 {
|
|
unimplemented!()
|
|
}
|
|
|
|
pub fn weight(&self) -> f32 {
|
|
unimplemented!()
|
|
}
|
|
|
|
pub fn set_age(&mut self, new_age: u32) {
|
|
unimplemented!()
|
|
}
|
|
|
|
pub fn set_weight(&mut self, new_weight: f32) {
|
|
unimplemented!()
|
|
}
|
|
}
|