Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I am trying to implement a flight server.
As such, for example in the get_flight_info_sql_info method, we get a CommandGetSqlInfo result.
It's .info field is of type Vec<u32>. I would like to get the original Semantic (enum) back, so a Vec<SqlInfo>
Describe the solution you'd like
Implement TryFrom or something similar to get the enum back from the primitive.
Prost might even be able to generate this by adding #[derive(::prost::Enumeration)]:
https://docs.rs/prost/0.11.8/prost/index.html
Describe alternatives you've considered
Match all cases manually.
Actually, this might be a bug. I see #[derive(::prost::Enumeration)] is already implemented. The Problem is that SqlInfo is an i32 while CommandGetSqlInfo is a vec of u32. This should be compatible.
Is your feature request related to a problem or challenge? Please describe what you are trying to do. I am trying to implement a flight server. As such, for example in the
get_flight_info_sql_info
method, we get aCommandGetSqlInfo
result. It's.info
field is of typeVec<u32>
. I would like to get the original Semantic (enum) back, so aVec<SqlInfo>
Describe the solution you'd like Implement TryFrom or something similar to get the enum back from the primitive. Prost might even be able to generate this by adding
#[derive(::prost::Enumeration)]
: https://docs.rs/prost/0.11.8/prost/index.htmlDescribe alternatives you've considered Match all cases manually.