func (Export) MessageStringOf(m pref.ProtoMessage) string {
	return prototext.MarshalOptions{Multiline: false}.Format(m)
}
MessageStringOf returns the message value as a string,
which is the message serialized in the protobuf text format.
package impl
import (
	"fmt"
	"reflect"
	"strconv"
	"google.golang.org/protobuf/encoding/prototext"
	"google.golang.org/protobuf/internal/errors"
	"google.golang.org/protobuf/proto"
	pref "google.golang.org/protobuf/reflect/protoreflect"
	piface "google.golang.org/protobuf/runtime/protoiface"
)
type Export struct{}
func (Export) NewError(f string, x ...interface{}) error {
	return errors.New(f, x...)
}
type enum = interface{}
func (Export) EnumOf(e enum) pref.Enum {
	switch e := e.(type) {
	case nil:
		return nil
	case pref.Enum:
		return e
	default:
		return legacyWrapEnum(reflect.ValueOf(e))
	}
}
func (Export) EnumDescriptorOf(e enum) pref.EnumDescriptor {
	switch e := e.(type) {
	case nil:
		return nil
	case pref.Enum:
		return e.Descriptor()
	default:
		return LegacyLoadEnumDesc(reflect.TypeOf(e))
	}
}
func (Export) EnumTypeOf(e enum) pref.EnumType {
	switch e := e.(type) {
	case nil:
		return nil
	case pref.Enum:
		return e.Type()
	default:
		return legacyLoadEnumType(reflect.TypeOf(e))
	}
}
func (Export) EnumStringOf(ed pref.EnumDescriptor, n pref.EnumNumber) string {
	ev := ed.Values().ByNumber(n)
	if ev != nil {
		return string(ev.Name())
	}
	return strconv.Itoa(int(n))
}
type message = interface{}
type legacyMessageWrapper struct{ m pref.ProtoMessage }
func (m legacyMessageWrapper) Reset()         { proto.Reset(m.m) }
func (m legacyMessageWrapper) String() string { return Export{}.MessageStringOf(m.m) }
func (m legacyMessageWrapper) ProtoMessage()  {}
func (Export) ProtoMessageV1Of(m message) piface.MessageV1 {
	switch mv := m.(type) {
	case nil:
		return nil
	case piface.MessageV1:
		return mv
	case unwrapper:
		return Export{}.ProtoMessageV1Of(mv.protoUnwrap())
	case pref.ProtoMessage:
		return legacyMessageWrapper{mv}
	default:
		panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", m))
	}
}
func (Export) protoMessageV2Of(m message) pref.ProtoMessage {
	switch mv := m.(type) {
	case nil:
		return nil
	case pref.ProtoMessage:
		return mv
	case legacyMessageWrapper:
		return mv.m
	case piface.MessageV1:
		return nil
	default:
		panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", m))
	}
}
func (Export) ProtoMessageV2Of(m message) pref.ProtoMessage {
	if m == nil {
		return nil
	}
	if mv := (Export{}).protoMessageV2Of(m); mv != nil {
		return mv
	}
	return legacyWrapMessage(reflect.ValueOf(m)).Interface()
}
func (Export) MessageOf(m message) pref.Message {
	if m == nil {
		return nil
	}
	if mv := (Export{}).protoMessageV2Of(m); mv != nil {
		return mv.ProtoReflect()
	}
	return legacyWrapMessage(reflect.ValueOf(m))
}
func (Export) MessageDescriptorOf(m message) pref.MessageDescriptor {
	if m == nil {
		return nil
	}
	if mv := (Export{}).protoMessageV2Of(m); mv != nil {
		return mv.ProtoReflect().Descriptor()
	}
	return LegacyLoadMessageDesc(reflect.TypeOf(m))
}
func (Export) MessageTypeOf(m message) pref.MessageType {
	if m == nil {
		return nil
	}
	if mv := (Export{}).protoMessageV2Of(m); mv != nil {
		return mv.ProtoReflect().Type()
	}
	return legacyLoadMessageInfo(reflect.TypeOf(m), "")
}