Currently, we accept user types in the driver via serde only. This has a bunch of downsides:
- it locks the driver and the user into serde rather than any alternative (e.g. facet)
- it makes serde a hard dependency of the driver
- it leaves potential optimizations (avoiding copies / extra work with raw documents) unavailable
We can solve these by implementing a bson conversion interface that uses pluggable tags, as demonstrated in this Rust playground.