pub trait RegisterHandlers: ICommandInfo {
// Required method
fn register_handlers(
services: &ServiceProvider,
) -> impl Future<Output = Result<CommandRegistry<Self>, Report<ResolveError>>> + Send
where Self: Sized;
}Expand description
Describe how to populate a CommandRegistry for a command system.
Implemented by the CommandInfo type generated by define_commands_server.
A blanket impl bridges this to FromServicesAsync so the registry can be
resolved from the DI container without violating orphan rules.
Required Methods§
Sourcefn register_handlers(
services: &ServiceProvider,
) -> impl Future<Output = Result<CommandRegistry<Self>, Report<ResolveError>>> + Sendwhere
Self: Sized,
fn register_handlers(
services: &ServiceProvider,
) -> impl Future<Output = Result<CommandRegistry<Self>, Report<ResolveError>>> + Sendwhere
Self: Sized,
Build a CommandRegistry by resolving handlers from the ServiceProvider.