pub fn answer(&mut self) -> Result<(), CallError> {
        use CallState::*;
        let states = vec![IncomingRinging, IncomingWaiting];
        let idx = self
            .oldest_by_state(states[0])
            .or_else(|| self.oldest_by_state(states[1]))
            .ok_or(CallError::None(states))?
            .0;
        self.request_active(idx, true)
    }
/// Answer a single call based on the following policy:
///
///   * The oldest Incoming Ringing call is answered.
///   * If there are no Incoming Ringing calls, the oldest Incoming Waiting call is answered.
///   * If there are no calls in any of the previously specified states, return an Error.
// Incoming Waiting is prioritized last because implementations should be using the AT+CHLD
// command to manage waiting calls instead of the ATA command.
Answer a single call based on the following policy:
The oldest Incoming Ringing call is answered.
If there are no Incoming Ringing calls, the oldest Incoming Waiting call is answered.
If there are no calls in any of the previously specified states, return an Error.
Incoming Waiting is prioritized last because implementations should be using the AT+CHLD
command to manage waiting calls instead of the ATA command.
Answer a single call based on the following policy : The oldest Incoming Ringing call is answered . If there are no Incoming Ringing calls the oldest Incoming Waiting call is answered . If there are no calls in any of the previously specified states return an Error . Incoming Waiting is prioritized last because implementations should be using the AT + CHLD command to manage waiting calls instead of the ATA command .
pub fn answer(&mut self) -> Result<(), CallError> {
        use CallState::*;
        let states = vec![IncomingRinging, IncomingWaiting];
        let idx = self
            .oldest_by_state(states[0])
            .or_else(|| self.oldest_by_state(states[1]))
            .ok_or(CallError::None(states))?
            .0;
        self.request_active(idx, true)
    }
pub fn answer ( & mut self ) -> Result < ( ) , CallError > { use CallState :: * ; let states = vec ! [ IncomingRinging IncomingWaiting ] ; let idx = self . oldest_by_state ( states [ 0 ] ) . or_else ( | | self . oldest_by_state ( states [ 1 ] ) ) . ok_or ( CallError :: None ( states ) ) ? . 0 ; self . request_active ( idx , true ) }
Answer a single call based on the following policy:
 The oldest Incoming Ringing call is answered.
Answer a single call based on the following policy : The oldest Incoming Ringing call is answered .
&mut self
&mut self