Registered

Trait Registered 

Source
pub unsafe trait Registered<R: Registry + ?Sized>: Any {
    // Required methods
    fn register() -> Registration<R, Self>;
    fn type_info() -> &'static <R as Registry>::TypeInfo;
}
Expand description

Trait which marks a type as registered with a particular registry.

Required Methods§

Source

fn register() -> Registration<R, Self>

Register the type with the registry. Should internally use the registration! macro (click for example).

Source

fn type_info() -> &'static <R as Registry>::TypeInfo

Statically allocate and return the information about the registered type.

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§