ProtoEnum

Trait ProtoEnum 

Source
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§

Source

fn from_i32(v: i32) -> Option<Self>

Source

fn into_proto_enum(self) -> T

Source

fn unpack_enum(v: T) -> Self

Provided Methods§

Source

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.

Implementors§