v2.5.0
The MongoDB Rust driver team is pleased to announce the v2.5.0 release of the bson crate.
Highlighted Changes
This release sees the addition of a wide variety of helper functions, largely focused on making common type conversions more convenient:
Binary::from_base64allows constructing aBinaryvalue from a base64-encoded string without having to use another crate.i64_as_bson_datetimeprovides Serde helpers for representing bsonDateTimevalues as rusti64fields.Binary::as_raw_binaryandRawBinaryRef::to_binaryallow easy interconversion between the parsed and raw slice reference types for binary data.RawBsonandRawDocumentBufnow implementTryFromfor their respective parsed types (BsonandDocument).Document::iter_mutprovides an iterator over mutable references to the containedBsonvalues.
Full Release Notes
New Features
- RUST-1385 Add binary/raw conversions (#370)
- RUST-1480 Add a TryFrom impl for RawBson (#373)
- RUST-1534: implement iter_mut on Document (#382)
- RUST-1540 impl i64_as_datetime (#383)
- RUST-1225 Add base64 string constructor to Binary (#365)
- RUST-1540 Rename i64_as_datetime to i64_as_bson_datetime (#393)
Improvements
- docs(readme): fix broken hyperlink (#375) (thanks satyarohith!)
- RUST-1062 More efficiently serialize array indexes (#384)
- Fix links in the Feature Flags table. (#388) (thanks judy2k!)
- RUST-782 Add hyperlinks for all types in rustdoc (#389)