pub trait Enum: Eq + Sized + Copy + Debug + Default + Send + Sync + 'static {
const NAME: &'static str;
const VALUES: &'static [Self] = _;
// Required methods
fn value(&self) -> i32;
fn from_i32(v: i32) -> Option<Self>;
fn from_str(s: &str) -> 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§
Required Methods§
Object Safety§
This trait is not object safe.