pub trait ProtoEnum<T>where
Self: Sized,{
// Required methods
fn from_i32(v: i32) -> Option<Self>;
fn into_proto_enum(self) -> T;
fn unpack_enum(v: T) -> Self;
// Provided method
fn unpack_i32(v: i32) -> Result<Self, Error>
where Self: ProtoEnumMeta { ... }
}Required Methods§
fn from_i32(v: i32) -> Option<Self>
fn into_proto_enum(self) -> T
fn unpack_enum(v: T) -> Self
Provided Methods§
fn unpack_i32(v: i32) -> Result<Self, Error>where
Self: ProtoEnumMeta,
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.