pbbson 0.1.2

Utilities for pbjson to BSON conversion
docs.rs failed to build pbbson-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

pbbson-rs

Utilities for pbjson to BSON conversions.

License Arch

Installing

$ cargo add pbbson

Testing

$ make check

Using

Convert a Prost Protobuf message into a BSON Document

use bson::Document;
use pbbson::Model;

let doc: Document = Model::try_from(&message).unwrap().into();

Convert a BSON Document into a Prost Protobuf message

let my_struct: StructType = model.try_into().unwrap();