Component

Trait Component 

Source
pub trait Component:
    'static
    + Send
    + Sync {
    // Required method
    fn name(&self) -> &'static str;

    // Provided method
    fn register_in(self, registry: &Registry) -> Result<(), RegistryError>
       where Self: Sized { ... }
}
Expand description

Convenience trait for components that can register themselves

Required Methods§

Source

fn name(&self) -> &'static str

Component name

Provided Methods§

Source

fn register_in(self, registry: &Registry) -> Result<(), RegistryError>
where Self: Sized,

Register this component in the registry

Implementors§