Skip to main content

get_attribute

Function get_attribute 

Source
pub fn get_attribute(config_json: &str, code: &str) -> Result<Value>
Expand description

Get a specific attribute by code

§Arguments

  • config_json - JSON configuration string
  • code - Attribute code to retrieve

§Returns

JSON Value representing the attribute

§Errors

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