pub trait Enum: Eq + Sized + Copy + Debug + Default + Send + Sync + 'static {
const NAME: &'static str;
const VALUES: &'static [Self] = &[];
fn value(&self) -> i32;
fn from_i32(v: i32) -> Option<Self>;
}
Expand description
Trait implemented by all protobuf enum types.
Additionally, generated enums also implement EnumFull
trait,
which provides access to reflection.
Required Associated Constants
Provided Associated Constants
const VALUES: &'static [Self] = &[]
const VALUES: &'static [Self] = &[]
All enum values for enum type.