Function simics::api::base::attr_value::attr_data_size
source · pub fn attr_data_size(attr: &AttrValue) -> Result<u32>
Expand description
Get the size of an AttrValue
’s data in bytes
§Arguments
attr
- TheAttrValue
to get the size of
§Return Value
The size of the AttrValue
if it is the correct type, or an error otherwise
§Notes
This function should generally not be used. Instead, data should be obtained from
the AttrValue
with TryInto
or with attr_data
for example:
ⓘ
let x: YourType = a.as_data().ok_or_else(|| /* Error */)?;
let x: YourType = attr_data(a)?;
§Context
All Contexts