Module required

Source
Expand description

(De)serialize a required std::time::Duration in the friendly duration format using compact designators.

Note that this will still deserialize ISO 8601 duration strings. The main feature of this module is that serialization will use the friendly format instead of the ISO 8601 format.

This is meant to be used with Serde’s with attribute.

Functions§

deserialize
Deserialize a required ISO 8601 or friendly duration from a std::time::Duration.
serialize
Serialize a required “friendly” duration from a std::time::Duration.