fn send_and_schedule_retransmission<R: Rng>(
        self,
        transaction_id: [u8; 3],
        options_to_request: &[v6::OptionCode],
        rng: &mut R,
    ) -> Transition {
        let options_array = [v6::DhcpOption::Oro(options_to_request)];
        let options = if options_to_request.is_empty() { &[][..] } else { &options_array[..] };

        let builder =
            v6::MessageBuilder::new(v6::MessageType::InformationRequest, transaction_id, options);
        let mut buf = vec![0; builder.bytes_len()];
        let () = builder.serialize(&mut buf);

        let retrans_timeout = self.retransmission_timeout(rng);

        Transition {
            state: ClientState::InformationRequesting(InformationRequesting { retrans_timeout }),
            actions: vec![
                Action::SendMessage(buf),
                Action::ScheduleTimer(ClientTimerType::Retransmission, retrans_timeout),
            ],
        }
    }
/// A helper function that returns a transition back to `InformationRequesting`, with actions
/// to send an information request and schedules retransmission.
A helper function that returns a transition back to `InformationRequesting`, with actions
to send an information request and schedules retransmission.
A helper function that returns a transition back to ` InformationRequesting ` with actions to send an information request and schedules retransmission .
fn send_and_schedule_retransmission<R: Rng>(
        self,
        transaction_id: [u8; 3],
        options_to_request: &[v6::OptionCode],
        rng: &mut R,
    ) -> Transition {
        let options_array = [v6::DhcpOption::Oro(options_to_request)];
        let options = if options_to_request.is_empty() { &[][..] } else { &options_array[..] };
        let builder =
            v6::MessageBuilder::new(v6::MessageType::InformationRequest, transaction_id, options);
        let mut buf = vec![0; builder.bytes_len()];
        let () = builder.serialize(&mut buf);
        let retrans_timeout = self.retransmission_timeout(rng);
        Transition {
            state: ClientState::InformationRequesting(InformationRequesting { retrans_timeout }),
            actions: vec![
                Action::SendMessage(buf),
                Action::ScheduleTimer(ClientTimerType::Retransmission, retrans_timeout),
            ],
        }
    }
fn send_and_schedule_retransmission < R : Rng > ( self , transaction_id : [ u8 ; 3 ] , options_to_request : & [ v6 :: OptionCode ] , rng : & mut R , ) -> Transition { let options_array = [ v6 :: DhcpOption :: Oro ( options_to_request ) ] ; let options = if options_to_request . is_empty ( ) { & [ ] [ .. ] } else { & options_array [ .. ] } ; let builder = v6 :: MessageBuilder :: new ( v6 :: MessageType :: InformationRequest , transaction_id , options ) ; let mut buf = vec ! [ 0 builder bytes_len ( ) ] ; let ( ) = builder . serialize ( & mut buf ) ; let retrans_timeout = self . retransmission_timeout ( rng ) ; Transition { state : ClientState :: InformationRequesting ( InformationRequesting { retrans_timeout } ) , actions : vec ! [ Action SendMessage ( buf ) Action ScheduleTimer ( ClientTimerType Retransmission retrans_timeout ) ] , } }
A helper function that returns a transition back to `InformationRequesting`, with actions
to send an information request and schedules retransmission.
A helper function that returns a transition back to ` InformationRequesting ` with actions to send an information request and schedules retransmission .
self
transaction_id
[u8; 3]
options_to_request
&[v6::OptionCode]
rng
&mut R
self
transaction_id
[u8; 3]
options_to_request
&[v6::OptionCode]
rng
&mut R