async fn execute_command(&mut self, command: String) -> ShouldExit {
        let mut words = command.split_whitespace();
        let res = match words.next() {
            None => Ok(false),
            Some("connect") => self.connect(&mut words).await,
            Some("devices") => self.devices(&mut words).await,
            Some("sendll") => self.send(&mut words).await,
            Some("quit") => self.quit(&mut words).await,
            Some(w) => self.unknown_command(w),
        };
        match res {
            Ok(b) => b,
            Err(e) => {
                println!("{}", e);
                false
            }
        }
    }
// return true means exit the repl
return true means exit the repl
return true means exit the repl
async fn execute_command(&mut self, command: String) -> ShouldExit {
        let mut words = command.split_whitespace();
        let res = match words.next() {
            None => Ok(false),
            Some("connect") => self.connect(&mut words).await,
            Some("devices") => self.devices(&mut words).await,
            Some("sendll") => self.send(&mut words).await,
            Some("quit") => self.quit(&mut words).await,
            Some(w) => self.unknown_command(w),
        };
        match res {
            Ok(b) => b,
            Err(e) => {
                println!("{}", e);
                false
            }
        }
    }
async fn execute_command ( & mut self , command : String ) -> ShouldExit { let mut words = command . split_whitespace ( ) ; let res = match words . next ( ) { None => Ok ( false ) , Some ( " " ) => self . connect ( & mut words ) . await , Some ( " " ) => self . devices ( & mut words ) . await , Some ( " " ) => self . send ( & mut words ) . await , Some ( " " ) => self . quit ( & mut words ) . await , Some ( w ) => self . unknown_command ( w ) , } ; match res { Ok ( b ) => b , Err ( e ) => { println ! ( " " e ) ; false } } }
return true means exit the repl
return true means exit the repl
&mut self
command
String
&mut self
command
String