struct Bio { name: String, age: u8, three_sizes: (u8, u8, u8), prefecture: String, } impl Bio { fn new(name: String, age: u8, sizes: (u8, u8, u8), home: String) -> Bio { Bio {name: name, age: age, three_sizes: sizes, prefecture: home } } fn info(&self) { println!( "Name: {} Age: {} Birthplace: {} Three Sizes: {}-{}-{}", self.name, self.age, self.three_sizes.0, self.three_sizes.1, self.three_sizes.2, self.prefecture ); } } enum Idol { Idol765(Bio), Idol346(Bio), Idol283(Bio), } fn main() { let chiyoko = Idol::Idol283(Bio::new("SONODA Chiyoko".to_string(), 17, (85,56,82), "Chiba".to_string())); }