Module simics::api::base::attr_value
source ยท Expand description
Type-safe wrappers for operations on AttrValue
s including conversion to and from Rust
types
Macrosยง
- impl_
from_ ๐float - impl_
from_ ๐signed - impl_
from_ ๐unsigned - impl_
try_ ๐into_ float - impl_
try_ ๐into_ signed
Structsยง
- Owned attribute value
Enumsยง
- A value type that can be converted to and from
AttrValue
Functionsยง
- _alloc_
attr_ ๐dict Allocate anAttrValue
dict with sizelength
. The dictionary elements are initialized to invalidAttrValues
- _alloc_
attr_ ๐list Allocate anAttrValue
list with sizelength
. The list elements are initialized to invalidAttrValues
- _attr_
dict_ ๐resize Resize attr, which must be of dict type, to newsize elements. New elements are marked invalid. Dropped elements are freed. - _attr_
dict_ ๐set_ item 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. - _attr_
list_ ๐resize Resize attr, which must be of list type, to newsize elements. New elements are set to invalid value. Dropped elements are freed. - _attr_
list_ ๐set_ item Set the element numbered index of the list attr to elem. The previous value at that position is freed. The ownership for elem is transferred from the caller to attr. - _free_
attribute ๐Free an attr value. - Allocate an
AttrValue
dict with sizelength
. The dictionary elements are initialized to invalidAttrValues
- Allocate an
AttrValue
list with sizelength
. The list elements are initialized to invalidAttrValues
- Get an
AttrValue
as a boolean if it is one, or return an error - Get the contained data from an
AttrValue
if it is a data value, or return an error if it is not. - Get the size of an
AttrValue
โs data in bytes - Get a key from an
AttrValue
dict if it is one, or an error otherwise. - Resize attr, which must be of dict type, to newsize elements. New elements are marked invalid. Dropped elements are freed.
- 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.
- Get a value for an
AttrValue
dictionary. - Get an
AttrValue
as a f64 - Get an
AttrValue
as an integer if it is one, or return an error. - Check whether an
AttrValue
is a boolean - Check whether an
AttrValue
is data - Check whether an
AttrValue
is a dict - Check whether an
AttrValue
is a String - Check whether an
AttrValue
is int64 - Check whether an
AttrValue
is an integer - Check whether an
AttrValue
is invalid - Check whether an
AttrValue
is a list - Check whether an
AttrValue
is nil - Check whether an
AttrValue
is aConfObject
pointer - Check whether an
AttrValue
is a String - Check whether an
AttrValue
is uint64 - Retrieve a list item from an attr list without converting the item to a specific type.
- Resize attr, which must be of list type, to newsize elements. New elements are set to invalid value. Dropped elements are freed.
- Set the element numbered index of the list attr to elem. The previous value at that position is freed. The ownership for elem is transferred from the caller to attr.
- Get an
AttrValue
as aConfObject
pointer - Get an
AttrValue
as aConfObject
pointer if it is one, or a null pointer otherwise. - Get an
AttrValue
as a String. - Free an attr value.
- Create a new boolean
AttrValue
- Create a new data
AttrValue
- Create a new data
AttrValue
- Create a new dictionary
AttrValue
from key value pairs. - Create a new floating point
AttrValue
- Create a new int64
AttrValue
- Create a new invalid
AttrValue
- Create a new list
AttrValue
. The items are moved into the new list, which takes ownership of the input data. - Create a new nil
AttrValue
- Create a new object
AttrValue
- Create a new uint64
AttrValue
Type Aliasesยง
- Type alias for the kind of an
AttrValue