Crate simics_macro

source ·
Expand description

Derive/attribute macros for simics-api

Modules§

Attribute Macros§

  • Attribute macro for declaring a Simics class for a Rust struct type
  • Declare a struct implementation as a SIMICS API interface.
  • Marks a function as being a SIMICS API that can throw exceptions in called FFI APIs.
  • Mark a function as being the initializer of a Simics module.

Derive Macros§

  • Derive macro for implementing conversion to raw ConfObject pointers. This macro implements the AsConfObject trait for the annotated type.
  • Derive macro for implementing the Class trait for the annotated type
  • Derive Macro for implementing conversion from an AttrValue dict into a struct, where each key, value pair in the dict is a struct field’s name, value pair.
  • Derive Macro for implementing conversion from an AttrValue list into a struct, where each entry in the list is a struct field’s value.
  • Derive macro for implementing conversion from raw ConfObject pointers. This macro implements the FromConfObject trait for the annotated type.
  • Derive Macro for implementing conversion into an AttrValue dictionary, where each struct field’s key, value pair is an entry in the dictionary.
  • Derive Macro for implementing conversion into an AttrValue list, where each struct field’s value is an entry in the heterogeneous list.