pub struct RelationBehaviourStorage(/* private fields */);
Implementations§
Source§impl RelationBehaviourStorage
impl RelationBehaviourStorage
pub fn new() -> Self
pub fn insert( &self, key: RelationInstanceId, ty: BehaviourTypeId, behaviour: Arc<dyn BehaviourFsm<RelationInstanceId, ReactiveRelation> + Send + Sync>, ) -> Option<Arc<dyn BehaviourFsm<RelationInstanceId, ReactiveRelation> + Send + Sync>>
pub fn remove( &self, key: &RelationInstanceId, ty: &BehaviourTypeId, ) -> Option<(BehaviourTypeId, Arc<dyn BehaviourFsm<RelationInstanceId, ReactiveRelation> + Send + Sync>)>
Sourcepub fn remove_by_behaviour(&self, ty: &BehaviourTypeId)
pub fn remove_by_behaviour(&self, ty: &BehaviourTypeId)
Removes all behaviours of the given behaviour type.
pub fn remove_all(&self, key: &RelationInstanceId)
pub fn has(&self, key: &RelationInstanceId, ty: &BehaviourTypeId) -> bool
pub fn get( &self, key: &RelationInstanceId, ty: &BehaviourTypeId, ) -> Option<Arc<dyn BehaviourFsm<RelationInstanceId, ReactiveRelation> + Send + Sync>>
pub fn get_by_behaviour( &self, ty: &BehaviourTypeId, ) -> Vec<Arc<dyn BehaviourFsm<RelationInstanceId, ReactiveRelation> + Send + Sync>>
pub fn get_behaviours_by_instance( &self, key: &RelationInstanceId, ) -> Vec<BehaviourTypeId>
pub fn get_instances_by_behaviour( &self, ty: &BehaviourTypeId, ) -> Vec<ReactiveRelation>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RelationBehaviourStorage
impl !RefUnwindSafe for RelationBehaviourStorage
impl Send for RelationBehaviourStorage
impl Sync for RelationBehaviourStorage
impl Unpin for RelationBehaviourStorage
impl !UnwindSafe for RelationBehaviourStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more