Cargo Features

bson2 has no features set by default.

[dependencies]
bson2 = { version = "2.0.3", features = ["chrono-0_4", "uuid-0_8", "serde_with"] }
chrono-0_4

if enabled, include API for interfacing with chrono 0.4

Affects serde_helpers::chrono_datetime_as_bson_datetime

uuid-0_8

if enabled, include API for interfacing with uuid 0.8

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

Features from optional dependencies

serde_with implicit feature

Enables serde_with ^1

serde_with:

Custom de/serialization functions for Rust's serde