How to import or export bson document to a file?

I'm using the latest version of bson lib. I didn't find any methods in the doc to read or write bson document to a file?

Use the to_vec to get a Vec<u8>, then write the vector using e.g. std::fs::write.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.