// UnsafeString returns an unsafe string reference of b. // The caller must treat the input slice as immutable. // // WARNING: Use carefully. The returned result must not leak to the end user // unless the input slice is provably immutable. func UnsafeString(b []byte) string { … } // UnsafeBytes returns an unsafe bytes slice reference of s. // The caller must treat returned slice as immutable. // // WARNING: Use carefully. The returned result must not leak to the end user. func UnsafeBytes(s string) []byte { … } type Builder … // AppendFullName is equivalent to protoreflect.FullName.Append, // but optimized for large batches where each name has a shared lifetime. func (sb *Builder) AppendFullName(prefix protoreflect.FullName, name protoreflect.Name) protoreflect.FullName { … } // MakeString is equivalent to string(b), but optimized for large batches // with a shared lifetime. func (sb *Builder) MakeString(b []byte) string { … } func (sb *Builder) grow(n int) { … } func (sb *Builder) last(n int) string { … }