Trait TypeInfo

Source
pub trait TypeInfo {
    // Required methods
    fn type_name() -> &'static str;
    fn type_id() -> TypeId;
}
Expand description

Provides static type metadata for message types.

Each message type that can be sent or received in the runtime must implement TypeInfo to provide a unique TypeId derived from its type name (hashed with SHA-256).

Required Methods§

Source

fn type_name() -> &'static str

Source

fn type_id() -> TypeId

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§