Available on crate feature chrono-0_4 only.
Expand description

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

#[derive(Serialize, Deserialize)]
struct Event {
    #[serde(with = "chrono_datetime_as_bson_datetime")]
    pub date: chrono::DateTime<chrono::Utc>,
}

Functions§