Skip to content

Conversation

patrickfreed
Copy link
Contributor

@patrickfreed patrickfreed commented Dec 2, 2021

RUST-1119

This PR adds the bson::to_raw_document_buf convenience function. I originally set out to also add bson::to_raw_bson as well (RUST-1110), but it looked like it was going to be a lot of effort for functionality that might not be all that useful. For now, I've split off just this function (which definitely will be useful) and am putting the to_raw_bson work on the backburner. Let me know if that sounds okay.

src/ser/mod.rs Outdated
///
/// let cat = Cat { name: "Garfield".to_string(), age: 43 };
/// let doc = bson::to_raw_document_buf(&cat)?;
/// // assert_eq!(doc, rawdoc! { "name": "Garfield", "age": 43 })
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once #329 is merged, I'll rebase and uncomment this line.

@patrickfreed patrickfreed force-pushed the RUST-1119/to_raw_document branch from 44f0a2b to 8307afa Compare December 3, 2021 18:22
@patrickfreed patrickfreed merged commit a25bf3c into mongodb:master Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants