pub fn serialize<T, S>(d: &Option<T>, s: S) -> Result<S::Ok, S::Error>where for<'a> Serde<&'a T>: Serialize, S: Serializer,
Serializes an Option<Duration> or Option<SystemTime>
Option<Duration>
Option<SystemTime>
This function can be used with serde_derive’s with and deserialize_with annotations.
serde_derive
with
deserialize_with