func (r *RequestResponseFrame) Metadata() ([]byte, bool) {
	return r.trySliceMetadata(0)
}
Metadata returns metadata bytes.
package framing
import (
	"github.com/rsocket/rsocket-go/core"
	"github.com/rsocket/rsocket-go/internal/bytesconv"
	"github.com/rsocket/rsocket-go/internal/common"
	"github.com/rsocket/rsocket-go/internal/u24"
)
type RequestResponseFrame struct {
	*bufferedFrame
}
func NewRequestResponseFrame(id uint32, data, metadata []byte, fg core.FrameFlag) *RequestResponseFrame {
	if len(metadata) > 0 {
		fg |= core.FlagMetadata
	}
	b := common.BorrowByteBuff()
	if err := core.WriteFrameHeader(b, id, core.FrameTypeRequestResponse, fg); err != nil {
		common.ReturnByteBuff(b)
		panic(err)
	}
	if len(metadata) > 0 {
		if err := u24.WriteUint24(b, len(metadata)); err != nil {
			common.ReturnByteBuff(b)
			panic(err)
		}
		if _, err := b.Write(metadata); err != nil {
			common.ReturnByteBuff(b)
			panic(err)
		}
	}
	if len(data) > 0 {
		if _, err := b.Write(data); err != nil {
			common.ReturnByteBuff(b)
			panic(err)
		}
	}
	return &RequestResponseFrame{
		bufferedFrame: newBufferedFrame(b),
	}
}
func (r *RequestResponseFrame) Validate() (err error) {
	if r.HasFlag(core.FlagMetadata) && r.bodyLen() < 3 {
		err = errIncompleteFrame
	}
	return
}