Trait RelationBehaviourRegistry

Source
pub trait RelationBehaviourRegistry: Send + Sync {
    // Required methods
    fn register<'life0, 'async_trait>(
        &'life0 self,
        relation_behaviour_ty: RelationBehaviourTypeId,
        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,
        relation_behaviour_ty: &'life1 RelationBehaviourTypeId,
    ) -> 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 RelationBehaviourTypeIds,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn register<'life0, 'async_trait>( &'life0 self, relation_behaviour_ty: RelationBehaviourTypeId, 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 behaviours. If a relation instance is of the relation type then the given behaviour is applied. The behaviour will be created using the given RelationBehaviourCreator.

Source

fn unregister<'life0, 'life1, 'async_trait>( &'life0 self, relation_behaviour_ty: &'life1 RelationBehaviourTypeId, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Unregisters a factory for creating relation behaviours.

Provided Methods§

Source

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,

Source

fn unregister_all<'life0, 'life1, 'async_trait>( &'life0 self, tys: &'life1 RelationBehaviourTypeIds, ) -> 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 relation behaviour types.

Implementors§