Skip to main content

set_attribute

Function set_attribute 

Source
pub fn set_attribute(
    config_json: &str,
    params: SetAttributeParams<'_>,
) -> Result<String>
Expand description

Set (update) an attribute’s properties

§Arguments

  • config_json - JSON configuration string
  • code - Attribute code to update
  • updates - JSON Value with fields to update

§Returns

Modified configuration JSON string

§Errors

  • NotFound if attribute doesn’t exist
  • JsonParse if config_json is invalid
  • MissingSection if CFG_ATTR section doesn’t exist