Skip to main content

enum_name

Function enum_name 

Source
pub fn enum_name<E>(value: i32, name: fn(&E) -> &'static str) -> String
where E: TryFrom<i32>,
Expand description

The protobuf name of an enum value of type E, or its number.

name is the enum’s as_str_name, passed because prost generates it as an inherent method rather than a trait method.