Skip to main content

material_to_json

Function material_to_json 

Source
pub fn material_to_json(material: &dyn Material) -> Option<Value>
Expand description

Serializes a material into an editable serde-JSON object of the form { "type_name": <name>, "material": <concrete material> }, matching the (type_name, data) split that serialize_material_component uses for bincode. Returns None if no registration claims the material.