# pbbson-rs
Utilities for [pbjson](https://crates.io/crates/pbjson-types) to [BSON](https://crates.io/crates/bson) conversions.
[](LICENSE)
[]()
## Installing
```shell
$ cargo add pbbson
```
## Testing
```shell
$ make check
```
## Using
### Convert a Prost Protobuf message into a BSON Document
```rust
use bson::Document;
use pbbson::Model;
let doc: Document = Model::try_from(&message).unwrap().into();
```
### Convert a BSON Document into a Prost Protobuf message
```rust
let my_struct: StructType = model.try_into().unwrap();
```