Struct Builder
Order Rust code to create structs, read their fields, and update them.
Challenge 1 of 3Score 0 / 3
Create a Pet named Miso, then print its name.
Use the up and down buttons to reorder the lines.
Type definition
struct Pet {
name: String,
}
fn main() {println!("{}", pet.name);let pet = Pet { name: String::from("Miso") };
}Create the pet before a line can read its field.