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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.