Cargo Features

BSON has no features set by default.

[dependencies]
bson = { version = "2.7.0", features = ["chrono-0_4", "uuid-1", "time-0_3", "uuid-0_8", "serde_with", "serde_with-3"] }
chrono-0_4 = chrono

if enabled, include API for interfacing with chrono 0.4

Affects serde_helpers::chrono_datetime_as_bson_datetime

uuid-1

if enabled, include API for interfacing with uuid 1.x

Affects serde_helpers::uuid_1_as_binary, serde_helpers::uuid_1_as_java_legacy_binary, serde_helpers::uuid_1_as_python_legacy_binary, serde_helpers::uuid_1_as_c_sharp_legacy_binary

time-0_3

if enabled, include API for interfacing with time 0.3

Affects serde_helpers::time_0_3_offsetdatetime_as_bson_datetime

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

chrono chrono-0_4?

With std

uuid-0_8 implicit feature

Enables serde, v4 and default (std) of uuid ^0.8.1

Affects serde_helpers::uuid_as_binary, serde_helpers::uuid_as_java_legacy_binary, serde_helpers::uuid_as_python_legacy_binary, serde_helpers::uuid_as_c_sharp_legacy_binary

serde_with implicit feature

Enables default (macros) of serde_with ^1.3.1

serde_with-3 implicit feature

Enables default features of serde_with