I am working on a Rust project, using Protocol Buffers, and dealing with
nested enums. Here's what I have so far in Rust:
enum Vehicle { Car(CarType), Truck(TruckType), } enum CarType { Sedan,
Coupe, Hatchback, } enum TruckType { Pickup, Semi, } fn create_vehicle_fleet()
-> [Vehicle; 8] { [ Vehicle::Car(CarType::Sedan),
Vehicle::Truck(TruckType::Pickup),
Vehicle::Car(CarType::Coupe), Vehicle::Truck(TruckType::Semi),
Vehicle::Car(CarType::Hatchback),
Vehicle::Car(CarType::Sedan), Vehicle::Truck(TruckType::Pickup), Vehicle::
Car(CarType::Coupe), ] }
I cannot find a proper way to represent the Vehicle enum in protobuf. Can
anyone suggest a solution or provide guidance on how to handle this
situation in Protocol Buffers?
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/5ce579ef-0ca1-4508-8757-a83d380b3f4an%40googlegroups.com.