TypedEnum

Trait TypedEnum 

Source
pub trait TypedEnum
where Self: Sized + Clone,
{ // Required methods fn try_from_type( type_id: TypeId, data: &dyn Any, ) -> Result<Self, UnknownTypeError>; fn get_type(&self) -> TypeId; fn get_payload(&self) -> Vec<u8> ; fn serialize(&self) -> Vec<u8> ; }

Required Methods§

Source

fn try_from_type( type_id: TypeId, data: &dyn Any, ) -> Result<Self, UnknownTypeError>

Source

fn get_type(&self) -> TypeId

Source

fn get_payload(&self) -> Vec<u8>

Source

fn serialize(&self) -> Vec<u8>

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§