  readRawInto(T& m) {
    SerializationTraits<T>::clear(m);
    const auto pr = readKVContainerFieldSizeAndInnerTypes();
    bool mismatch = false;
    if (pr.first.first !=
        detail::TypeToField<
            typename SerializationTraits<T>::key_type>::fieldType) {
      mismatch = true;
      LOG_FIRST_N(ERROR, 100) << "Type mismatch between Map key type and"
                              << " wire type. Skipping.";
    }
    if (pr.first.second !=
        detail::TypeToField<
            typename SerializationTraits<T>::mapped_type>::fieldType) {
      mismatch = true;
      LOG_FIRST_N(ERROR, 100) << "Type mismatch between Map value type "
                              << "and wire type. Skipping.";
    }
    if (mismatch) {
      skipKVContainerItems(pr);
      return;
    }
    const auto size = pr.second;
    SerializationTraits<T>::reserve(m, size);
    for (size_t i = 0; i < size; ++i) {
      auto keyValue = readRaw<typename SerializationTraits<T>::key_type>();
      auto mappedValue =
          readRaw<typename SerializationTraits<T>::mapped_type>();
      SerializationTraits<T>::emplace(
          m, std::move(keyValue), std::move(mappedValue));
    }
  }
  readRawInto(T& m) {
    SerializationTraits<T>::clear(m);
    const auto pr = readKVContainerFieldSizeAndInnerTypes();
    bool mismatch = false;
    if (pr.first.first !=
        detail::TypeToField<
            typename SerializationTraits<T>::key_type>::fieldType) {
      mismatch = true;
      LOG_FIRST_N(ERROR, 100) << "Type mismatch between Map key type and"
                              << " wire type. Skipping.";
    }
    if (pr.first.second !=
        detail::TypeToField<
            typename SerializationTraits<T>::mapped_type>::fieldType) {
      mismatch = true;
      LOG_FIRST_N(ERROR, 100) << "Type mismatch between Map value type "
                              << "and wire type. Skipping.";
    }
    if (mismatch) {
      skipKVContainerItems(pr);
      return;
    }
    const auto size = pr.second;
    SerializationTraits<T>::reserve(m, size);
    for (size_t i = 0; i < size; ++i) {
      auto keyValue = readRaw<typename SerializationTraits<T>::key_type>();
      auto mappedValue =
          readRaw<typename SerializationTraits<T>::mapped_type>();
      SerializationTraits<T>::emplace(
          m, std::move(keyValue), std::move(mappedValue));
    }
  }