pub trait RelationComponentBehaviourRegistry: Send + Sync {
// Required methods
fn register<'life0, 'async_trait>(
&'life0 self,
component_behaviour_ty: ComponentBehaviourTypeId,
factory: Arc<dyn BehaviourFactory<RelationInstanceId, ReactiveRelation> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unregister<'life0, 'life1, 'async_trait>(
&'life0 self,
component_behaviour_ty: &'life1 ComponentBehaviourTypeId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn register_all<'life0, 'life1, 'async_trait>(
&'life0 self,
factories: &'life1 BehaviourFactories<RelationInstanceId, ReactiveRelation>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn unregister_all<'life0, 'life1, 'async_trait>(
&'life0 self,
tys: &'life1 ComponentBehaviourTypeIds,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Required Methods§
Sourcefn register<'life0, 'async_trait>(
&'life0 self,
component_behaviour_ty: ComponentBehaviourTypeId,
factory: Arc<dyn BehaviourFactory<RelationInstanceId, ReactiveRelation> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register<'life0, 'async_trait>(
&'life0 self,
component_behaviour_ty: ComponentBehaviourTypeId,
factory: Arc<dyn BehaviourFactory<RelationInstanceId, ReactiveRelation> + Send + Sync>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Registers a factory for creating relation component behaviours. If a relation instance has the given component then the given behaviour is applied. The behaviour will be created using the given RelationBehaviourCreator.
Sourcefn unregister<'life0, 'life1, 'async_trait>(
&'life0 self,
component_behaviour_ty: &'life1 ComponentBehaviourTypeId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unregister<'life0, 'life1, 'async_trait>(
&'life0 self,
component_behaviour_ty: &'life1 ComponentBehaviourTypeId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unregisters a factory for creating relation component behaviours.
Provided Methods§
fn register_all<'life0, 'life1, 'async_trait>(
&'life0 self,
factories: &'life1 BehaviourFactories<RelationInstanceId, ReactiveRelation>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn unregister_all<'life0, 'life1, 'async_trait>(
&'life0 self,
tys: &'life1 ComponentBehaviourTypeIds,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unregister_all<'life0, 'life1, 'async_trait>(
&'life0 self,
tys: &'life1 ComponentBehaviourTypeIds,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unregisters the behaviour factories for the given component behaviour types.