pub trait Enum: Eq + Sized + Copy + Debug + Default + Send + Sync + 'static {
const NAME: &'static str;
fn value(&self) -> i32;
fn from_i32(v: i32) -> Option<Self>;
fn values() -> &'static [Self]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
;
}
Expand description
Trait implemented by all protobuf enum types.
Additionally, generated enums also implement EnumFull
trait,
which provides access to reflection.
Associated Constants
Required methods
Try to create an enum from i32
value.
Return None
if value is unknown.