Struct simics::api::simulator::hap_consumer::haps::CoreHapCallbackRemovedHap
source · pub struct CoreHapCallbackRemovedHap {}
Expand description
Index: hap_number Description: Triggered after a callback has been unregistered. The callback called by this hap is not allowed to remove any hap callbacks. Automatically generated struct for the HAP
Implementations§
source§impl CoreHapCallbackRemovedHap
impl CoreHapCallbackRemovedHap
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.
sourcepub fn add_callback_index<F>(callback: F, index: i64) -> Result<HapHandle>
pub fn add_callback_index<F>(callback: F, index: i64) -> Result<HapHandle>
Add a callback to be called on each occurrence of this HAP for a specific index value. The callback may capture its environment.
Only HAPs which support an index may add a callback in this manner, and the index varies for each HAP. For example, the
CoreMagicInstructionHap
supports an index equal to the magic value.
§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.index
- The index value for this HAP: Index: hap_number Description: Triggered after a callback has been unregistered. The callback called by this hap is not allowed to remove any hap callbacks.
sourcepub fn add_callback_range<F>(
callback: F,
start: i64,
end: i64,
) -> Result<HapHandle>
pub fn add_callback_range<F>( callback: F, start: i64, end: i64, ) -> Result<HapHandle>
Add a callback to be called on each occurrence of this HAP for a specific index value range. The callback may capture its environment.
Only HAPs which support an index may add a callback in this manner, and the index varies for each HAP. For example, the
CoreMagicInstructionHap
supports an index equal to the magic value.
§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.start
- The start of the range of index values for this HAP: Index: hap_number Description: Triggered after a callback has been unregistered. The callback called by this hap is not allowed to remove any hap callbacks.end
- The start of the range of index values for this HAP: Index: hap_number Description: Triggered after a callback has been unregistered. The callback called by this hap is not allowed to remove any hap callbacks.
sourcepub fn add_callback_object_index<F>(
callback: F,
obj: *mut ConfObject,
index: i64,
) -> Result<HapHandle>
pub fn add_callback_object_index<F>( callback: F, obj: *mut ConfObject, index: i64, ) -> Result<HapHandle>
Add a callback to be called on each occurrence of this HAP on a specific object for a specific index value. The callback may capture its environment.
Only HAPs which support an index may add a callback in this manner, and the index varies for each HAP. For example, the
CoreMagicInstructionHap
supports an index equal to the magic value.
§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.index
- The index value for this HAP: Index: hap_number Description: Triggered after a callback has been unregistered. The callback called by this hap is not allowed to remove any hap callbacks.
sourcepub fn add_callback_object_range<F>(
callback: F,
obj: *mut ConfObject,
start: i64,
end: i64,
) -> Result<HapHandle>
pub fn add_callback_object_range<F>( callback: F, obj: *mut ConfObject, start: i64, end: i64, ) -> Result<HapHandle>
Add a callback to be called on each occurrence of this HAP on a specific object for a specific index value range. The callback may capture its environment.
Only HAPs which support an index may add a callback in this manner, and the index varies for each HAP. For example, the
CoreMagicInstructionHap
supports an index equal to the magic value.
§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.start
- The start of the range of index values for this HAP: Index: hap_number Description: Triggered after a callback has been unregistered. The callback called by this hap is not allowed to remove any hap callbacks.end
- The start of the range of index values for this HAP: Index: hap_number Description: Triggered after a callback has been unregistered. The callback called by this hap is not allowed to remove any hap callbacks.