func (cae *condAddrEncoder) EncodeValue(ec EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error {
	if val.CanAddr() {
		return cae.canAddrEnc.EncodeValue(ec, vw, val)
	}
	if cae.elseEnc != nil {
		return cae.elseEnc.EncodeValue(ec, vw, val)
	}
	return ErrNoEncoder{Type: val.Type()}
}
EncodeValue is the ValueEncoderFunc for a value that may be addressable.
package bsoncodec
import (
	"reflect"
	"go.mongodb.org/mongo-driver/bson/bsonrw"
)
type condAddrEncoder struct {
	canAddrEnc ValueEncoder
	elseEnc    ValueEncoder
}
var _ ValueEncoder = (*condAddrEncoder)(nil)
func newCondAddrEncoder(canAddrEnc, elseEnc ValueEncoder) *condAddrEncoder {
	encoder := condAddrEncoder{canAddrEnc: canAddrEnc, elseEnc: elseEnc}
	return &encoder
}