reactive_graph_behaviour_model_api/container.rs
1use crate::BehaviourTypeId;
2
3pub trait BehaviourTypeContainer {
4 fn ty(&self) -> BehaviourTypeId;
5}
6
7pub trait BehaviourTypesContainer {
8 /// Returns the behaviour types of the container.
9 fn get_behaviours(&self) -> Vec<BehaviourTypeId>;
10
11 /// Adds a behaviour to the container.
12 fn add_behaviour(&self, ty: BehaviourTypeId);
13
14 /// Removes a behaviour from the container.
15 fn remove_behaviour(&self, ty: &BehaviourTypeId);
16
17 /// Returns true, if the reactive instance behaves as the given behaviour.
18 fn behaves_as(&self, ty: &BehaviourTypeId) -> bool;
19}