---
name: "mongoc_read_prefs_new"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_read_prefs_new"
---

# mongoc\_read\_prefs\_new(3)

## SYNOPSIS

```
mongoc_read_prefs_t *
mongoc_read_prefs_new (mongoc_read_mode_t read_mode);
```

## PARAMETERS

- •

  **read\_mode**: A *mongoc\_read\_mode\_t*.

## DESCRIPTION

Creates a new *mongoc\_read\_prefs\_t* using the mode specified.

## RETURNS

Returns a newly allocated *mongoc\_read\_prefs\_t* that should be freed with *mongoc\_read\_prefs\_destroy()*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
