Trait dendrite_auth::dendrite::axon_utils::AggregateRegistry
source · pub trait AggregateRegistry {
// Required methods
fn register(
&mut self,
applicator: &'static dyn Fn(&mut Self) -> Result<(), Error>
) -> Result<(), Error>;
fn insert(
&mut self,
aggregate_handle: Arc<dyn AggregateHandle>
) -> Result<(), Error>;
fn get(&self, name: &str) -> Option<Arc<dyn AggregateHandle>>;
fn register_commands(
&self,
commands: &mut Vec<String>,
command_to_aggregate_mapping: &mut HashMap<String, String>
);
}
Expand description
Trait that needs to be implemented by the aggregate registry.
Required Methods§
fn register( &mut self, applicator: &'static dyn Fn(&mut Self) -> Result<(), Error> ) -> Result<(), Error>
fn insert( &mut self, aggregate_handle: Arc<dyn AggregateHandle> ) -> Result<(), Error>
fn get(&self, name: &str) -> Option<Arc<dyn AggregateHandle>>
fn register_commands( &self, commands: &mut Vec<String>, command_to_aggregate_mapping: &mut HashMap<String, String> )
Object Safety§
This trait is not object safe.