Trait BehaviourFactory

Source
pub trait BehaviourFactory<ID: Clone, T: ReactiveInstance<ID>> {
    // Required methods
    fn create(
        &self,
        reactive_instance: T,
    ) -> Result<Arc<dyn BehaviourFsm<ID, T> + Send + Sync>, BehaviourCreationError>;
    fn behaviour_ty(&self) -> &BehaviourTypeId;
}

Required Methods§

Source

fn create( &self, reactive_instance: T, ) -> Result<Arc<dyn BehaviourFsm<ID, T> + Send + Sync>, BehaviourCreationError>

Creates a new behaviour in the given reactive instance and returns the created state machine.

Source

fn behaviour_ty(&self) -> &BehaviourTypeId

Returns the behaviour type of the behaviour factory.

Implementors§