struct StateInitial {}
Expand description
Represents the initial state. Technically, this struct and its implementation is not needed but Rust demands all avenues through code handle all elements of an enum (see StateContext::get_behavior()).
Implementations§
source§impl StateInitial
impl StateInitial
sourcepub fn new() -> Box<dyn IStateBehavior>
pub fn new() -> Box<dyn IStateBehavior>
Constructor
Returns
Returns a new instance of the StateInitial struct as represented by the IStateBehavior trait.
Trait Implementations§
source§impl IStateBehavior for StateInitial
impl IStateBehavior for StateInitial
source§fn go_next(&mut self, _context: &mut dyn IStateContext) -> CurrentState
fn go_next(&mut self, _context: &mut dyn IStateContext) -> CurrentState
Process the next character from the context, returning the next
state the context should move to. Read more