---
name: "mongoc_read_prefs_copy"
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_copy"
---

# mongoc\_read\_prefs\_copy(3)

## SYNOPSIS

```
mongoc_read_prefs_t *
mongoc_read_prefs_copy (const mongoc_read_prefs_t *read_prefs);
```

## PARAMETERS

- •

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

## DESCRIPTION

This function shall deep copy a read preference.

## RETURNS

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

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
