fn receive_data_internal(&mut self, bytes: &mut Vec<u8>) -> ProcedureRequest {
        // Parse the byte buffer into a HF message.
        let parse_result = at::Command::deserialize(&mut Cursor::new(bytes));

        if let Err(err) = parse_result {
            warn!("Received unparseable AT command: {:?}", err);
            return ProcedureError::UnparsableHf(err).into();
        }

        let command = parse_result.unwrap();
        info!("Received {:?}", command);

        // Attempt to match the received command to a procedure.
        let procedure_id = match self.match_command_to_procedure(&command) {
            Ok(id) => id,
            Err(e) => return e.into(),
        };
        // Handle the received HF commend.
        self.handle_command(procedure_id, command.into())
    }
/// Consume bytes from the peer (HF), producing a parsed at::Command from the bytes and
/// handling it. Internal helper method for `Self::receive_data`.
///
/// Returns the request from handling the command.
Consume bytes from the peer (HF), producing a parsed at::Command from the bytes and
handling it. Internal helper method for `Self::receive_data`.

Returns the request from handling the command.
Consume bytes from the peer ( HF ) producing a parsed at :: Command from the bytes and handling it . Internal helper method for ` Self :: receive_data ` . Returns the request from handling the command .
fn receive_data_internal(&mut self, bytes: &mut Vec<u8>) -> ProcedureRequest {
        // Parse the byte buffer into a HF message.
        let parse_result = at::Command::deserialize(&mut Cursor::new(bytes));
        if let Err(err) = parse_result {
            warn!("Received unparseable AT command: {:?}", err);
            return ProcedureError::UnparsableHf(err).into();
        }
        let command = parse_result.unwrap();
        info!("Received {:?}", command);
        // Attempt to match the received command to a procedure.
        let procedure_id = match self.match_command_to_procedure(&command) {
            Ok(id) => id,
            Err(e) => return e.into(),
        };
        // Handle the received HF commend.
        self.handle_command(procedure_id, command.into())
    }
fn receive_data_internal ( & mut self , bytes : & mut Vec < u8 > ) -> ProcedureRequest { // Parse the byte buffer into a HF message. let parse_result = at :: Command :: deserialize ( & mut Cursor :: new ( bytes ) ) ; if let Err ( err ) = parse_result { warn ! ( " " err ) ; return ProcedureError :: UnparsableHf ( err ) . into ( ) ; } let command = parse_result . unwrap ( ) ; info ! ( " " command ) ; // Attempt to match the received command to a procedure. let procedure_id = match self . match_command_to_procedure ( & command ) { Ok ( id ) => id , Err ( e ) => return e . into ( ) , } ; // Handle the received HF commend. self . handle_command ( procedure_id , command . into ( ) ) }
Consume bytes from the peer (HF), producing a parsed at::Command from the bytes and
handling it.
Consume bytes from the peer ( HF ) producing a parsed at :: Command from the bytes and handling it .
&mut self
bytes
&mut Vec<u8>
&mut self
bytes
&mut Vec<u8>