pub fn handle_message_receive<B: ByteSlice>(&mut self, msg: v6::Message<'_, B>) -> Actions {
        if msg.transaction_id() != &self.transaction_id {
            Vec::new() // Ignore messages for other clients.
        } else {
            match msg.msg_type() {
                v6::MessageType::Reply => {
                    let Transition { state, actions } = self
                        .state
                        .take()
                        .expect("state should not be empty")
                        .reply_message_received(msg);
                    self.state = Some(state);
                    actions
                }
                v6::MessageType::Advertise => {
                    // TODO(jayzhuang): support Advertise messages when needed.
                    // https://tools.ietf.org/html/rfc8415#section-18.2.9
                    Vec::new()
                }
                v6::MessageType::Reconfigure => {
                    // TODO(jayzhuang): support Reconfigure messages when needed.
                    // https://tools.ietf.org/html/rfc8415#section-18.2.11
                    Vec::new()
                }
                _ => {
                    // Ignore unexpected message types.
                    Vec::new()
                }
            }
        }
    }
/// Handles a received DHCPv6 message.
///
/// # Panics
///
/// `handle_reply` panics if current state is None.
Handles a received DHCPv6 message.
Handles a received DHCPv6 message .
pub fn handle_message_receive<B: ByteSlice>(&mut self, msg: v6::Message<'_, B>) -> Actions {
        if msg.transaction_id() != &self.transaction_id {
            Vec::new() // Ignore messages for other clients.
        } else {
            match msg.msg_type() {
                v6::MessageType::Reply => {
                    let Transition { state, actions } = self
                        .state
                        .take()
                        .expect("state should not be empty")
                        .reply_message_received(msg);
                    self.state = Some(state);
                    actions
                }
                v6::MessageType::Advertise => {
                    // TODO(jayzhuang): support Advertise messages when needed.
                    // https://tools.ietf.org/html/rfc8415#section-18.2.9
                    Vec::new()
                }
                v6::MessageType::Reconfigure => {
                    // TODO(jayzhuang): support Reconfigure messages when needed.
                    // https://tools.ietf.org/html/rfc8415#section-18.2.11
                    Vec::new()
                }
                _ => {
                    // Ignore unexpected message types.
                    Vec::new()
                }
            }
        }
    }
pub fn handle_message_receive < B : ByteSlice > ( & mut self , msg : v6 :: Message < ' _ , B > ) -> Actions { if msg . transaction_id ( ) != & self . transaction_id { Vec :: new ( ) // Ignore messages for other clients. } else { match msg . msg_type ( ) { v6 :: MessageType :: Reply => { let Transition { state , actions } = self . state . take ( ) . expect ( " " ) . reply_message_received ( msg ) ; self . state = Some ( state ) ; actions } v6 :: MessageType :: Advertise => { // TODO(jayzhuang): support Advertise messages when needed. // https://tools.ietf.org/html/rfc8415#section-18.2.9 Vec :: new ( ) } v6 :: MessageType :: Reconfigure => { // TODO(jayzhuang): support Reconfigure messages when needed. // https://tools.ietf.org/html/rfc8415#section-18.2.11 Vec :: new ( ) } _ => { // Ignore unexpected message types. Vec :: new ( ) } } } }
Handles a received DHCPv6 message.
Handles a received DHCPv6 message .
&mut self
msg
v6::Message<'_, B>
&mut self
msg
v6::Message<'_, B>
panics
`handle_reply` panics if current state is None.
` handle_reply ` panics if current state is None .