/// Handles a timeout event, dispatches based on timeout type.
///
/// # Panics
///
/// `handle_timeout` panics if current state is None.
Handles a timeout event, dispatches based on timeout type.
Handles a timeout event dispatches based on timeout type .
pub fn handle_timeout(&mut self, timeout_type: ClientTimerType) -> Actions {
        let state = self.state.take().expect("state should not be empty");
        let Transition { state, actions } = match timeout_type {
            ClientTimerType::Retransmission => state.retransmission_timer_expired(
                self.transaction_id,
                &self.options_to_request,
                &mut self.rng,
            ),
            ClientTimerType::Refresh => state.refresh_timer_expired(
                self.transaction_id,
                &self.options_to_request,
                &mut self.rng,
            ),
        };
        self.state = Some(state);
        actions
    }
pub fn handle_timeout ( & mut self , timeout_type : ClientTimerType ) -> Actions { let state = self . state . take ( ) . expect ( " " ) ; let Transition { state , actions } = match timeout_type { ClientTimerType :: Retransmission => state . retransmission_timer_expired ( self . transaction_id , & self . options_to_request , & mut self . rng , ) , ClientTimerType :: Refresh => state . refresh_timer_expired ( self . transaction_id , & self . options_to_request , & mut self . rng , ) , } ; self . state = Some ( state ) ; actions }
Handles a timeout event, dispatches based on timeout type.
Handles a timeout event dispatches based on timeout type .
&mut self
timeout_type
ClientTimerType
panics
`handle_timeout` panics if current state is None.
` handle_timeout ` panics if current state is None .