func (c *CollectionOptions) SetReadPreference(rp *readpref.ReadPref) *CollectionOptions {
	c.ReadPreference = rp
	return c
}
SetReadPreference sets the value for the ReadPreference field.
package options
import (
	"go.mongodb.org/mongo-driver/bson/bsoncodec"
	"go.mongodb.org/mongo-driver/mongo/readconcern"
	"go.mongodb.org/mongo-driver/mongo/readpref"
	"go.mongodb.org/mongo-driver/mongo/writeconcern"
)
type CollectionOptions struct {
	ReadConcern *readconcern.ReadConcern
	WriteConcern *writeconcern.WriteConcern
	ReadPreference *readpref.ReadPref
	Registry *bsoncodec.Registry
}
func Collection() *CollectionOptions {
	return &CollectionOptions{}
}
func (c *CollectionOptions) SetReadConcern(rc *readconcern.ReadConcern) *CollectionOptions {
	c.ReadConcern = rc
	return c
}
func (c *CollectionOptions) SetWriteConcern(wc *writeconcern.WriteConcern) *CollectionOptions {
	c.WriteConcern = wc
	return c
}