Function simics::api::base::attr_value::attr_integer

source ·
pub fn attr_integer(attr: &AttrValue) -> Result<i64>
Expand description

Get an AttrValue as an integer if it is one, or return an error.

§Arguments

  • attr - The AttrValue to attempt to get as i64

§Return Value

The contained integer value if the AttrValue is the correct type, or an error otherwise.

§Notes

Conversion via TryInto should be preferred. For example:

let x: i64 = a.try_into()?;

§Context

All Contexts