Module option

Module option 

Source
Available on crate feature serde and (crate features formatting or parsing) only.
Expand description

Use the well-known RFC3339 format when serializing and deserializing an Option<OffsetDateTime>.

Use this module in combination with serde’s #[with] attribute.

Note: Due to serde-rs/serde#2878, you will need to apply #[serde(default)] if you want a missing field to deserialize as None.

Functions§

deserializeparsing
Deserialize an Option<OffsetDateTime> from its RFC3339 representation.
serializeformatting
Serialize an Option<OffsetDateTime> using the well-known RFC3339 format.