pub trait AutomatonState<'a, Id, D, E> {
// Required methods
fn get_id_owned(&self) -> Id;
fn get_id(&self) -> &Id;
fn execute_next_connection(
&self,
data: &mut D,
) -> Result<NextState<'a, Id, D, E>, E>;
}
Expand description
Representation of a node in automaton graph. States act as stop points for an automaton where next states are determined or for halting the execution when no more state changes can be done.
Required Methods§
Sourcefn get_id_owned(&self) -> Id
fn get_id_owned(&self) -> Id
Owned identifier used for identifying current state.
Sourcefn execute_next_connection(
&self,
data: &mut D,
) -> Result<NextState<'a, Id, D, E>, E>
fn execute_next_connection( &self, data: &mut D, ) -> Result<NextState<'a, Id, D, E>, E>
Represents change of current state in graph. Provides state to be executed by automaton. Implementations should use this method for executing operations connected with state change.