Function simuldb::serialize_metadata
source · pub fn serialize_metadata<S: Serialize + Debug>(metadata: S) -> Result<Map>Expand description
Generate Map object from serializable metadata.
This will serialize it as Value first and then extract the Map.
Unit types are also supported and will be serialized as an empty map.
If metadata serializes to anything except a map, an error of kind UnsupportedMetadata is returned.