Skip to main content

editable_variants

Function editable_variants 

Source
pub fn editable_variants(
    current_key: &str,
) -> Option<&'static [(&'static str, Value)]>
Expand description

Returns the editable variant set for a single-key JSON object whose key matches a known enum variant, or None if the key isn’t recognised.

Each entry is (variant_name, full_default_json). The full_default_json is the entire {"VariantName": {...}} object — callers replace the current map with it on selection.