pub fn msg_type(&mut self) -> Result<Option<MsgType>, Error<W::Error>> {
        let buf: [u8; 1] = match self.find_option_fixed_size(Options::MessageType)? {
            Some(bytes) => bytes,
            None => return Ok(None),
        };
        match MsgType::try_from(buf[0]) {
            Ok(mt) => Ok(Some(mt)),
            Err(x) => {
                warn!("not a message type value: {}", x);
                Ok(None)
            }
        }
    }
/// Returns the DHCP message type (option 53) if it exists.
Returns the DHCP message type (option 53) if it exists.
Returns the DHCP message type ( option 53 ) if it exists .
pub fn msg_type(&mut self) -> Result<Option<MsgType>, Error<W::Error>> {
        let buf: [u8; 1] = match self.find_option_fixed_size(Options::MessageType)? {
            Some(bytes) => bytes,
            None => return Ok(None),
        };
        match MsgType::try_from(buf[0]) {
            Ok(mt) => Ok(Some(mt)),
            Err(x) => {
                warn!("not a message type value: {}", x);
                Ok(None)
            }
        }
    }
pub fn msg_type ( & mut self ) -> Result < Option < MsgType > , Error < W :: Error > > { let buf : [ u8 ; 1 ] = match self . find_option_fixed_size ( Options :: MessageType ) ? { Some ( bytes ) => bytes , None => return Ok ( None ) , } ; match MsgType :: try_from ( buf [ 0 ] ) { Ok ( mt ) => Ok ( Some ( mt ) ) , Err ( x ) => { warn ! ( " " x ) ; Ok ( None ) } } }
Returns the DHCP message type (option 53) if it exists.
Returns the DHCP message type ( option 53 ) if it exists .
&mut self
&mut self