To describe a group of various kind of data. Defining & Instantiating enum Event {
Created,
Updated,
Deleted,
Ping,
} fn main() {
let created_ev = Event::Created;
} Enum Type Variants enum Event {
Created { title: String, content: String }, // struct variant
Updated,
Deleted(String), // Tuple Variant
Ping, // Unit struct
} fn main()…