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§
Provided Methods§
Sourcefn register_in(self, registry: &Registry) -> Result<(), RegistryError>where
Self: Sized,
fn register_in(self, registry: &Registry) -> Result<(), RegistryError>where
Self: Sized,
Register this component in the registry