 /// Visitor that encodes a message graph in the protobuf binary wire format.
 internal struct BinaryEncodingVisitor: Visitor {
 
-  private var encoder: BinaryEncoder
+  var encoder: BinaryEncoder
 
   /// Creates a new visitor that writes the binary-coded message into the memory
   /// at the given pointer.


      encoder.putVarInt(value: Int64(WireFormat.MessageSet.Tags.message.rawValue))

      // Can force partial to true here because the parent message would have
      // already recursed for the isInitialized check if it was needed.
      let payload = try value.serializedData(partial: true)
      encoder.putBytesValue(value: payload)

      encoder.putVarInt(value: Int64(WireFormat.MessageSet.Tags.itemEnd.rawValue))
    }

    encoder = BinaryEncoder(forWritingInto: pointer)
  }

  init(encoder: BinaryEncoder) {
    self.encoder = encoder
  }

  mutating func visitUnknown(bytes: Data) throws {
    encoder.appendUnknown(data: bytes)
  }
