pub trait RelationComponentBehaviourManager:
Send
+ Sync
+ Lifecycle {
Show 14 methods
// Required methods
fn add_behaviours_to_relation(&self, relation_instance: ReactiveRelation);
fn add_behaviours_to_relation_component(
&self,
relation_instance: ReactiveRelation,
component: Component,
);
fn add_behaviour_to_relation_component(
&self,
relation_instance: ReactiveRelation,
component_behaviour_ty: &ComponentBehaviourTypeId,
);
fn remove_behaviour_from_relation(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
);
fn remove_behaviours_from_relation(
&self,
relation_instance: ReactiveRelation,
);
fn remove_behaviours_from_relation_component(
&self,
relation_instance: ReactiveRelation,
component: Component,
);
fn remove_behaviours_by_key(
&self,
relation_instance_id: &RelationInstanceId,
);
fn remove_behaviours_by_behaviour(&self, behaviour_ty: &BehaviourTypeId);
fn has(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
) -> bool;
fn get_all(
&self,
relation_instance: ReactiveRelation,
) -> Vec<BehaviourTypeId>;
fn get_instances_by_behaviour(
&self,
ty: &BehaviourTypeId,
) -> Vec<ReactiveRelation>;
fn connect(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>;
fn disconnect(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>;
fn reconnect(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>;
}
Required Methods§
Sourcefn add_behaviours_to_relation(&self, relation_instance: ReactiveRelation)
fn add_behaviours_to_relation(&self, relation_instance: ReactiveRelation)
Adds new behaviours to the given relation instance.
Sourcefn add_behaviours_to_relation_component(
&self,
relation_instance: ReactiveRelation,
component: Component,
)
fn add_behaviours_to_relation_component( &self, relation_instance: ReactiveRelation, component: Component, )
Possibly adds new behaviour to the given relation instance’s component
Sourcefn add_behaviour_to_relation_component(
&self,
relation_instance: ReactiveRelation,
component_behaviour_ty: &ComponentBehaviourTypeId,
)
fn add_behaviour_to_relation_component( &self, relation_instance: ReactiveRelation, component_behaviour_ty: &ComponentBehaviourTypeId, )
Creates and adds the given behaviour to the given reactive entity instance’s component.
Sourcefn remove_behaviour_from_relation(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
)
fn remove_behaviour_from_relation( &self, relation_instance: ReactiveRelation, behaviour_ty: &BehaviourTypeId, )
Removes the given behaviour from the given reactive relation instance.
Sourcefn remove_behaviours_from_relation(&self, relation_instance: ReactiveRelation)
fn remove_behaviours_from_relation(&self, relation_instance: ReactiveRelation)
Removes behaviours from the given relation instance.
Sourcefn remove_behaviours_from_relation_component(
&self,
relation_instance: ReactiveRelation,
component: Component,
)
fn remove_behaviours_from_relation_component( &self, relation_instance: ReactiveRelation, component: Component, )
Removes behaviour from the given relation instance’s component
Sourcefn remove_behaviours_by_key(&self, relation_instance_id: &RelationInstanceId)
fn remove_behaviours_by_key(&self, relation_instance_id: &RelationInstanceId)
Removes behaviours from the given relation instance by relation instance id.
Sourcefn remove_behaviours_by_behaviour(&self, behaviour_ty: &BehaviourTypeId)
fn remove_behaviours_by_behaviour(&self, behaviour_ty: &BehaviourTypeId)
Removes all behaviours of the given behaviour type.
Sourcefn has(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
) -> bool
fn has( &self, relation_instance: ReactiveRelation, behaviour_ty: &BehaviourTypeId, ) -> bool
Returns true, if the relation instance has the given behaviour.
Sourcefn get_all(&self, relation_instance: ReactiveRelation) -> Vec<BehaviourTypeId>
fn get_all(&self, relation_instance: ReactiveRelation) -> Vec<BehaviourTypeId>
Returns the behaviours of the given relation instance.
Sourcefn get_instances_by_behaviour(
&self,
ty: &BehaviourTypeId,
) -> Vec<ReactiveRelation>
fn get_instances_by_behaviour( &self, ty: &BehaviourTypeId, ) -> Vec<ReactiveRelation>
Returns the relation instances with the given behaviour.
Sourcefn connect(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>
fn connect( &self, relation_instance: ReactiveRelation, behaviour_ty: &BehaviourTypeId, ) -> Result<(), BehaviourTransitionError>
Connect
Sourcefn disconnect(
&self,
relation_instance: ReactiveRelation,
behaviour_ty: &BehaviourTypeId,
) -> Result<(), BehaviourTransitionError>
fn disconnect( &self, relation_instance: ReactiveRelation, behaviour_ty: &BehaviourTypeId, ) -> Result<(), BehaviourTransitionError>
Disconnect