fn parse_type<R: io::Read>(identifier: Identifier, reader: &mut R) -> Result<DataType, Error> {
    use Identifier::*;

    match identifier {
      PayloadFormatIndicator
      | RequestProblemInformation
      | RequestResponseInformation
      | MaximumQos
      | RetainAvailable
      | WildcardSubscriptionAvailable
      | SubscriptionIdentifierAvailable
      | SharedSubscriptionAvailable => DataType::parse_byte(reader),
      ServerKeepAlive | ReceiveMaximum | TopicAliasMaximum | TopicAlias => {
        DataType::parse_two_byte_int(reader)
      }
      MessageExpiryInterval | SessionExpiryInterval | WillDelayInterval | MaximumPacketSize => {
        DataType::parse_four_byte_int(reader)
      }
      SubscriptionIdentifier => DataType::parse_variable_byte_int(reader),
      UserProperty => DataType::parse_utf8_string_pair(reader),
      CorrelationData | AuthenticationData => DataType::parse_binary_data(reader),
      ContentType
      | ResponseTopic
      | AssignedClientIdentifier
      | AuthenticationMethod
      | ResponseInformation
      | ServerReference
      | ReasonString => DataType::parse_utf8_string(reader),
    }
  }
/// Parse property values from a reader into DataType variants.
Parse property values from a reader into DataType variants.
Parse property values from a reader into DataType variants .
fn parse_type<R: io::Read>(identifier: Identifier, reader: &mut R) -> Result<DataType, Error> {
    use Identifier::*;
    match identifier {
      PayloadFormatIndicator
      | RequestProblemInformation
      | RequestResponseInformation
      | MaximumQos
      | RetainAvailable
      | WildcardSubscriptionAvailable
      | SubscriptionIdentifierAvailable
      | SharedSubscriptionAvailable => DataType::parse_byte(reader),
      ServerKeepAlive | ReceiveMaximum | TopicAliasMaximum | TopicAlias => {
        DataType::parse_two_byte_int(reader)
      }
      MessageExpiryInterval | SessionExpiryInterval | WillDelayInterval | MaximumPacketSize => {
        DataType::parse_four_byte_int(reader)
      }
      SubscriptionIdentifier => DataType::parse_variable_byte_int(reader),
      UserProperty => DataType::parse_utf8_string_pair(reader),
      CorrelationData | AuthenticationData => DataType::parse_binary_data(reader),
      ContentType
      | ResponseTopic
      | AssignedClientIdentifier
      | AuthenticationMethod
      | ResponseInformation
      | ServerReference
      | ReasonString => DataType::parse_utf8_string(reader),
    }
  }
fn parse_type < R : io :: Read > ( identifier : Identifier , reader : & mut R ) -> Result < DataType , Error > { use Identifier :: * ; match identifier { PayloadFormatIndicator | RequestProblemInformation | RequestResponseInformation | MaximumQos | RetainAvailable | WildcardSubscriptionAvailable | SubscriptionIdentifierAvailable | SharedSubscriptionAvailable => DataType :: parse_byte ( reader ) , ServerKeepAlive | ReceiveMaximum | TopicAliasMaximum | TopicAlias => { DataType :: parse_two_byte_int ( reader ) } MessageExpiryInterval | SessionExpiryInterval | WillDelayInterval | MaximumPacketSize => { DataType :: parse_four_byte_int ( reader ) } SubscriptionIdentifier => DataType :: parse_variable_byte_int ( reader ) , UserProperty => DataType :: parse_utf8_string_pair ( reader ) , CorrelationData | AuthenticationData => DataType :: parse_binary_data ( reader ) , ContentType | ResponseTopic | AssignedClientIdentifier | AuthenticationMethod | ResponseInformation | ServerReference | ReasonString => DataType :: parse_utf8_string ( reader ) , } }
Parse property values from a reader into DataType variants.
Parse property values from a reader into DataType variants .
identifier
Identifier
reader
&mut R
identifier
Identifier
reader
&mut R