Skip to content

Commit 12eb662

Browse files
authored
release v2.10.0 (#469)
1 parent 0bec43e commit 12eb662

File tree

3 files changed

+46
-23
lines changed

3 files changed

+46
-23
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bson"
3-
version = "2.9.0"
3+
version = "2.10.0"
44
authors = [
55
"Y. T. Chung <[email protected]>",
66
"Kevin Yeh <[email protected]>",

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This crate is available on [crates.io](https://crates.io/crates/bson). To use it
3737

3838
```toml
3939
[dependencies]
40-
bson = "2.9.0"
40+
bson = "2.10.0"
4141
```
4242

4343
Note that if you are using `bson` through the `mongodb` crate, you do not need to specify it in your

src/lib.rs

+44-21
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
//!
5252
//! ```toml
5353
//! [dependencies]
54-
//! bson = "2.9.0"
54+
//! bson = "2.10.0"
5555
//! ```
5656
//!
5757
//! Note that if you are using `bson` through the `mongodb` crate, you do not need to specify it in
@@ -208,25 +208,26 @@
208208
//! let redacted_bson = bson::to_bson(&person).unwrap();
209209
//! ```
210210
//!
211-
//! Any types that implement [`Serialize`](serde::Serialize) and [`Deserialize`](serde::Deserialize) can be used in this way. Doing so helps
212-
//! separate the "business logic" that operates over the data from the (de)serialization logic that
213-
//! translates the data to/from its serialized form. This can lead to more clear and concise code
214-
//! that is also less error prone.
211+
//! Any types that implement [`Serialize`](serde::Serialize) and [`Deserialize`](serde::Deserialize)
212+
//! can be used in this way. Doing so helps separate the "business logic" that operates over the
213+
//! data from the (de)serialization logic that translates the data to/from its serialized form. This
214+
//! can lead to more clear and concise code that is also less error prone.
215215
//!
216216
//! ## Working with datetimes
217217
//!
218218
//! The BSON format includes a datetime type, which is modeled in this crate by the
219219
//! [`DateTime`] struct, and the
220-
//! [`Serialize`](serde::Serialize) and [`Deserialize`](serde::Deserialize) implementations for this struct produce and parse BSON datetimes
221-
//! when serializing to or deserializing from BSON. The popular crate [`chrono`](docs.rs/chrono)
222-
//! also provides a [`DateTime`] type, but its [`Serialize`](serde::Serialize) and [`Deserialize`](serde::Deserialize) implementations operate
220+
//! [`Serialize`](serde::Serialize) and [`Deserialize`](serde::Deserialize) implementations for this
221+
//! struct produce and parse BSON datetimes when serializing to or deserializing from BSON. The
222+
//! popular crate [`chrono`](docs.rs/chrono) also provides a [`DateTime`] type, but its
223+
//! [`Serialize`](serde::Serialize) and [`Deserialize`](serde::Deserialize) implementations operate
223224
//! on strings instead, so when using it with BSON, the BSON datetime type is not used. To work
224225
//! around this, the `chrono-0_4` feature flag can be enabled. This flag exposes a number of
225-
//! convenient conversions between [`bson::DateTime`](crate::DateTime) and [`chrono::DateTime`], including the
226-
//! [`serde_helpers::chrono_datetime_as_bson_datetime`]
227-
//! serde helper, which can be used to (de)serialize [`chrono::DateTime`]s to/from BSON datetimes, and
228-
//! the `From<chrono::DateTime>` implementation for [`Bson`], which allows [`chrono::DateTime`] values
229-
//! to be used in the `doc!` and `bson!` macros.
226+
//! convenient conversions between [`bson::DateTime`](crate::DateTime) and [`chrono::DateTime`],
227+
//! including the [`serde_helpers::chrono_datetime_as_bson_datetime`]
228+
//! serde helper, which can be used to (de)serialize [`chrono::DateTime`]s to/from BSON datetimes,
229+
//! and the `From<chrono::DateTime>` implementation for [`Bson`], which allows [`chrono::DateTime`]
230+
//! values to be used in the `doc!` and `bson!` macros.
230231
//!
231232
//! e.g.
232233
//! ``` rust
@@ -267,8 +268,8 @@
267268
//!
268269
//! ## Minimum supported Rust version (MSRV)
269270
//!
270-
//! The MSRV for this crate is currently 1.64.0. This will be rarely be increased, and if it ever is,
271-
//! it will only happen in a minor or major version release.
271+
//! The MSRV for this crate is currently 1.64.0. This will be rarely be increased, and if it ever
272+
//! is, it will only happen in a minor or major version release.
272273
273274
#![allow(clippy::cognitive_complexity, clippy::derive_partial_eq_without_eq)]
274275
#![doc(html_root_url = "https://docs.rs/bson/2.6.0")]
@@ -280,18 +281,40 @@ pub use self::{
280281
bson::{Array, Bson, DbPointer, Document, JavaScriptCodeWithScope, Regex, Timestamp},
281282
datetime::DateTime,
282283
de::{
283-
from_bson, from_bson_with_options, from_document, from_document_with_options, from_reader,
284-
from_reader_utf8_lossy, from_slice, from_slice_utf8_lossy, Deserializer,
284+
from_bson,
285+
from_bson_with_options,
286+
from_document,
287+
from_document_with_options,
288+
from_reader,
289+
from_reader_utf8_lossy,
290+
from_slice,
291+
from_slice_utf8_lossy,
292+
Deserializer,
285293
DeserializerOptions,
286294
},
287295
decimal128::Decimal128,
288296
raw::{
289-
RawArray, RawArrayBuf, RawBinaryRef, RawBson, RawBsonRef, RawDbPointerRef, RawDocument,
290-
RawDocumentBuf, RawJavaScriptCodeWithScope, RawJavaScriptCodeWithScopeRef, RawRegexRef,
297+
RawArray,
298+
RawArrayBuf,
299+
RawBinaryRef,
300+
RawBson,
301+
RawBsonRef,
302+
RawDbPointerRef,
303+
RawDocument,
304+
RawDocumentBuf,
305+
RawJavaScriptCodeWithScope,
306+
RawJavaScriptCodeWithScopeRef,
307+
RawRegexRef,
291308
},
292309
ser::{
293-
to_bson, to_bson_with_options, to_document, to_document_with_options, to_raw_document_buf,
294-
to_vec, Serializer, SerializerOptions,
310+
to_bson,
311+
to_bson_with_options,
312+
to_document,
313+
to_document_with_options,
314+
to_raw_document_buf,
315+
to_vec,
316+
Serializer,
317+
SerializerOptions,
295318
},
296319
uuid::{Uuid, UuidRepresentation},
297320
};

0 commit comments

Comments
 (0)