fn send_response(&self, new_state: Option<AliceState>) {
        match new_state {
            None => self.send_form(),
            Some(AliceState::Init) => self.send_already_init(),
            Some(AliceState::Start) if self.is_started() => self.send_is_started(),
            Some(AliceState::Start) => self.send_will_start(),
            Some(AliceState::Stop) if self.is_stopped() => self.send_is_stopped(),
            Some(AliceState::Stop) => self.send_will_stop(),
            Some(AliceState::Bye) => self.send_bye_and_disconnect(),
            _ => (),
        }
    }
// Based upon current state and the proposed new state, send a response
Based upon current state and the proposed new state, send a response
Based upon current state and the proposed new state send a response
fn send_response(&self, new_state: Option<AliceState>) {
        match new_state {
            None => self.send_form(),
            Some(AliceState::Init) => self.send_already_init(),
            Some(AliceState::Start) if self.is_started() => self.send_is_started(),
            Some(AliceState::Start) => self.send_will_start(),
            Some(AliceState::Stop) if self.is_stopped() => self.send_is_stopped(),
            Some(AliceState::Stop) => self.send_will_stop(),
            Some(AliceState::Bye) => self.send_bye_and_disconnect(),
            _ => (),
        }
    }
fn send_response ( & self , new_state : Option < AliceState > ) { match new_state { None => self . send_form ( ) , Some ( AliceState :: Init ) => self . send_already_init ( ) , Some ( AliceState :: Start ) if self . is_started ( ) => self . send_is_started ( ) , Some ( AliceState :: Start ) => self . send_will_start ( ) , Some ( AliceState :: Stop ) if self . is_stopped ( ) => self . send_is_stopped ( ) , Some ( AliceState :: Stop ) => self . send_will_stop ( ) , Some ( AliceState :: Bye ) => self . send_bye_and_disconnect ( ) , _ => ( ) , } }
Based upon current state and the proposed new state, send a response
Based upon current state and the proposed new state send a response
&self
new_state
Option<AliceState>