Skip to main content

opt_object

Function opt_object 

Source
pub fn opt_object<'de, D: Deserializer<'de>, T: Deserialize<'de>>(
    d: D,
) -> Result<Option<T>, D::Error>
Expand description

Reads an object; null and non-object values ("", false, …) become None.

§Errors

When the object cannot be read as T.