Skip to main content

deserialize

Function deserialize 

Source
pub fn deserialize<'de, D>(deserializer: D) -> Result<DateTime<Utc>, D::Error>
where D: Deserializer<'de>,
Expand description

Reads a date-time text into a UTC DateTime.

It accepts any RFC 3339 text (with Z or with an offset, which is converted to UTC) and the plain YYYY-MM-DDTHH:MM:SS.mmmZ text.

§Errors

A serde error if the text is not a date-time in one of those forms. An empty text is an error here (the option module treats it as no value).