Function simics::api::base::attr_value::_attr_dict_set_item
source · fn _attr_dict_set_item<E>(attr: &mut AttrValue, index: u32, key: E, value: E)
Expand description
Set the element numbered index of the dict attr to key and value. The previous key and value at that position are freed. The ownership for key and value is transferred from the caller to attr. The key must be of integer, string or object type.
This function should generally not be used. Instead, values should be deserialized from
the AttrValue
, modified in a type-safe way, and serialized back.
§Arguments
attr
- The attribute dictionary to set an item inindex
- The numbered index to set.AttrValue
dictionaries are associative arrayskey
- The value to set the key item of the dict tovalue
- The value to set the value item of the dict to
§Context
Cell Context