ruma_common::serde::duration::secs

Function deserialize

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

Deserializes an integer representing seconds into a Duration.

Will fail if integer is greater than the maximum integer that can be unambiguously represented by an f64.