Function simics::api::base::attr_value::attr_object_or_nil
source · pub fn attr_object_or_nil(attr: &AttrValue) -> *mut ConfObject
Expand description
Get an AttrValue
as a ConfObject
pointer if it is one, or a null pointer
otherwise.
This function should typically not be used and is provided for compatibility only.
Use attr_object
instead.
§Arguments
attr
- TheAttrValue
to attempt to get as a*mut ConfObject
§Return Value
The contained ConfObject
value if the AttrValue
is the correct type, or a
null pointer otherwise.
§Notes
Conversion via TryInto
should be preferred. For example:
ⓘ
let x: *mut ConfObject = a.try_into()?;
§Context
All Contexts