Module bson::serde_helpers[][src]

Expand description

Collection of helper functions for serializing to and deserializing from BSON using Serde

Modules

Contains functions to serialize a crate::DateTime as an RFC 3339 (ISO 8601) formatted string and deserialize a crate::DateTime from an RFC 3339 (ISO 8601) formatted string.

Contains functions to serialize a chrono::DateTime as a crate::DateTime and deserialize a chrono::DateTime from a crate::DateTime.

Contains functions to serialize a hex string as an ObjectId and deserialize a hex string from an ObjectId

Contains functions to serialize an RFC 3339 (ISO 8601) formatted string as a crate::DateTime and deserialize an RFC 3339 (ISO 8601) formatted string from a crate::DateTime.

Contains functions to serialize a bson::Timestamp as a u32 and deserialize a bson::Timestamp from a u32. The u32 should represent seconds since the Unix epoch. Serialization will return an error if the Timestamp has a non-zero increment.

Contains functions to serialize a u32 as an f64 (BSON double) and deserialize a u32 from an f64 (BSON double).

Contains functions to serialize a u32 as a bson::Timestamp and deserialize a u32 from a bson::Timestamp. The u32 should represent seconds since the Unix epoch.

Contains functions to serialize a u64 as an f64 (BSON double) and deserialize a u64 from an f64 (BSON double).

Contains functions to serialize a uuid::Uuid as a crate::Binary and deserialize a uuid::Uuid from a crate::Binary. This only works with version 0.8 of the uuid crate.

Contains functions to serialize a uuid::Uuid to a crate::Binary in the legacy C# driver UUID format and deserialize uuid::Uuid from a crate::Binary in the legacy C# driver format.

Contains functions to serialize a uuid::Uuid to a crate::Binary in the legacy Java driver UUID format and deserialize uuid::Uuid from a crate::Binary in the legacy Java driver format.

Contains functions to serialize a uuid::Uuid to a crate::Binary in the legacy Python driver UUID format and deserialize uuid::Uuid from a crate::Binary in the legacy Python driver format.

Functions

Deserializes a crate::DateTime from an RFC 3339 formatted string.

Deserializes a chrono::DateTime from a crate::DateTime.

Deserializes a hex string from an ObjectId.

Deserializes an ISO string from a DateTime.

Deserializes a bson::Timestamp from a u32.

Deserializes a u32 from an f64 (BSON double). Errors if an exact conversion is not possible.

Deserializes a u32 from a bson::Timestamp.

Deserializes a u64 from an f64 (BSON double). Errors if an exact conversion is not possible.

Deserializes a Uuid from a Binary.

Deserializes a Uuid from a Binary in a C# Legacy UUID format.

Deserializes a Uuid from a Binary in a Java Legacy UUID format.

Deserializes a Uuid from a Binary in a Python Legacy UUID format.

Serializes a crate::DateTime as an RFC 3339 (ISO 8601) formatted string.

Serializes a chrono::DateTime as a crate::DateTime.

Serializes a hex string as an ObjectId.

Serializes an ObjectId as a hex string.

Serializes an ISO string as a DateTime.

Serializes a bson::Timestamp as a u32. Returns an error if the conversion is lossy (i.e. the Timestamp has a non-zero increment).

Serializes a u32 as an f64 (BSON double).

Attempts to serialize a u32 as an i32. Errors if an exact conversion is not possible.

Serializes a u32 as an i64.

Serializes a u32 as a bson::Timestamp.

Serializes a u64 as an f64 (BSON double). Errors if an exact conversion is not possible.

Attempts to serialize a u64 as an i32. Errors if an exact conversion is not possible.

Attempts to serialize a u64 as an i64. Errors if an exact conversion is not possible.

Serializes a Uuid as a Binary.

Serializes a Uuid as a Binary in a C# Legacy UUID format.

Serializes a Uuid as a Binary in a Java Legacy UUID format.

Serializes a Uuid as a Binary in a Python Legacy UUID format.