Function simics::api::base::attr_value::attr_dict_value

source ·
pub fn attr_dict_value(attr: &AttrValue, index: u32) -> Result<AttrValue>
Expand description

Get a value for an AttrValue dictionary.

Unlike the C API function, which does not transfer ownership of the value to the caller, this function copies the value and takes ownership of the new value. The old value’s ownership is not changed, and it is not freed.

§Arguments

  • attr - The AttrValue dictionary to get the value from
  • index - The index in the AttrValue associative array dictionary to get the value from

§Return Value

The value for the requested index in the dictionary, or an error otherwise

§Context

All Contexts