Skip to main content

IntoPropertyMap

Trait IntoPropertyMap 

Source
pub trait IntoPropertyMap {
    // Required method
    fn into_property_map(self) -> Result<Map<String, Value>>;
}
Expand description

Conversion into the property map carried by Data.

Implemented for serde_json::Map, HashMap, BTreeMap and serde_json::Value, so callers can pass their favorite container — including serde_json::json!({...}) literals, which must be JSON objects:




Required Methods§

Source

fn into_property_map(self) -> Result<Map<String, Value>>

Convert the value into a serde_json property map.

Fails when a Value argument is not a JSON object.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoPropertyMap for BTreeMap<String, Value>

Source§

impl IntoPropertyMap for HashMap<String, Value>

Source§

impl IntoPropertyMap for Map<String, Value>

Source§

impl IntoPropertyMap for Value

Implementors§