ruma_common::serde

Function none_as_default

Source
pub fn none_as_default<'de, D, T>(deserializer: D) -> Result<T, D::Error>
where D: Deserializer<'de>, T: Default + Deserialize<'de>,
Expand description

Deserialize a T via Option<T>, falling back to T::default().