pub fn push (&mut self, state : Box<dyn State>, message : Option<String>) {
        info!("Pushing state");
        match message {
            Some(msg) => {
                debug!("{}", msg);
            },
            _ => {},
        }
        self.states.push_front(state);
        self.states[0].init();
    }
/// Pushes a new state to the top of the stack.
Pushes a new state to the top of the stack.
Pushes a new state to the top of the stack .
pub fn push (&mut self, state : Box<dyn State>, message : Option<String>) {
        info!("Pushing state");
        match message {
            Some(msg) => {
                debug!("{}", msg);
            },
            _ => {},
        }
        self.states.push_front(state);
        self.states[0].init();
    }
pub fn push ( & mut self , state : Box < dyn State > , message : Option < String > ) { info ! ( " " ) ; match message { Some ( msg ) => { debug ! ( " " msg ) ; } , _ => { } , } self . states . push_front ( state ) ; self . states [ 0 ] . init ( ) ; }
Pushes a new state to the top of the stack.
Pushes a new state to the top of the stack .
&mut self
state
Box<dyn State>
message
Option<String>
&mut self
state
Box<dyn State>
message
Option<String>