Expand description
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
.
#[derive(Serialize, Deserialize)]
struct Event {
#[serde(with = "rfc3339_string_as_bson_datetime")]
pub date: String,
}
Functions
- Deserializes an ISO string from a DateTime.
- Serializes an ISO string as a DateTime.