Use Debug trait to print enum values if needed.
1
2
3
4
5
6
7
8
9
10
#[derive(Default,Debug)]
enum Car{
#[default]
Porsche,
Ferrari,
Skoda
}
let car = Car::default();
println!("{:?}", car);
Use Debug trait to print enum values if needed.
1
2
3
4
5
6
7
8
9
10
#[derive(Default,Debug)]
enum Car{
#[default]
Porsche,
Ferrari,
Skoda
}
let car = Car::default();
println!("{:?}", car);
A new version of content is available.