Expand description
Basic implementation of an automaton state. Provides management for handling connections between states and allows for some action to be executed while changing states. Designed to be used in parser like solutions.
Structs§
- Simple
Inter State Connection - Connection representing edge between two nodes (or one node with itself) in a graph structure. Matcher is used to find the next state. Based on the key provided by the data. Each connection has a specified function which will be executed while changing to matched next state.
- Simple
State Implementation - AutomatonState implementating struct which simplifies state definition by managing list of defined connections. Depends on data for providing next key. This key is then used to match a connection from the defined list. Each state has an assigned identifier which is used to inform which state did the automaton stop on. Identifier is copied to the result meaning it has to implement the Copy trait.
Traits§
- KeyProviding
Data - Represents data, that can provide a key which will be used while searching for next state. Usually will use iterator based on a sequence.