Struct simics::api::simulator::hap_consumer::haps::CoreConfObjectCreatedHap
source · pub struct CoreConfObjectCreatedHap {}
Expand description
Index: Indices not supported Description: Triggered when a configuration object has been created and finalized. This hap will always be followed by a Core_Conf_Objects_Created hap, but this hap can be triggered for more than one object before the Core_Conf_Objects_Created hap. Automatically generated struct for the HAP
Implementations§
source§impl CoreConfObjectCreatedHap
impl CoreConfObjectCreatedHap
sourcepub fn add_callback<F>(callback: F) -> Result<HapHandle>
pub fn add_callback<F>(callback: F) -> Result<HapHandle>
Add a callback to be called on each occurrence of this HAP. The callback may capture its environment.
§Arguments
callback
- The closure to fire as a callback. The closure will be doubly boxed. Any program state accessed inside the closure must have the static lifetime. This is not enforced by the compiler, it is up to the programmer to ensure the soundness of their callback code.
sourcepub fn add_callback_object<F>(
callback: F,
obj: *mut ConfObject,
) -> Result<HapHandle>
pub fn add_callback_object<F>( callback: F, obj: *mut ConfObject, ) -> Result<HapHandle>
Add a callback to be called on each occurrence of this HAP for a specific object. The callback may capture its environment.
§Arguments
callback
- The closure to fire as a callback. The closure will be doubly boxed. Any program state accessed inside the closure must have the static lifetime. This is not enforced by the compiler, it is up to the programmer to ensure the soundness of their callback code.obj
- The object to fire this callback for. This HAP will not trigger the callback when firing on any object other than this one.
Trait Implementations§
source§impl Hap for CoreConfObjectCreatedHap
impl Hap for CoreConfObjectCreatedHap
source§const NAME: Self::Name = crate::api::sys::CORE_CONF_OBJECT_CREATED_HAP_NAME
const NAME: Self::Name = crate::api::sys::CORE_CONF_OBJECT_CREATED_HAP_NAME
The name of the HAP.
source§type Name = &'static [u8]
type Name = &'static [u8]
The type of the name of the HAP, must be convertible to raw C string to pass to
the simulator
source§fn delete_callback_id(handle: HapHandle) -> Result<()>
fn delete_callback_id(handle: HapHandle) -> Result<()>
A callback for a hap can be deleted by its handle
source§fn delete_callback_obj_id(obj: *mut ConfObject, handle: HapHandle) -> Result<()>
fn delete_callback_obj_id(obj: *mut ConfObject, handle: HapHandle) -> Result<()>
A callback for a hap can be deleted by the object it is associated with
Auto Trait Implementations§
impl Freeze for CoreConfObjectCreatedHap
impl RefUnwindSafe for CoreConfObjectCreatedHap
impl Send for CoreConfObjectCreatedHap
impl Sync for CoreConfObjectCreatedHap
impl Unpin for CoreConfObjectCreatedHap
impl UnwindSafe for CoreConfObjectCreatedHap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more