---
name: "mongoc_optional_set_value"
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_optional_set_value"
---

# mongoc\_optional\_set\_value(3)

## SYNOPSIS

```
void
mongoc_optional_set_value (mongoc_optional_t *opt);
```

Sets a value on a *mongoc\_optional\_t*. Once a value has been set, it cannot be unset, i.e. *mongoc\_optional\_is\_set* will always return **true** after calling *mongoc\_optional\_set\_value*.

## PARAMETERS

- •

  **opt**: A *mongoc\_optional\_t*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
