Struct simics_api_sys::bindings::event_class
source · #[repr(C)]pub struct event_class {
pub name: *const c_char,
pub conf_class: *mut conf_class_t,
pub flags: event_class_flag_t,
pub callback: Option<unsafe extern "C" fn(obj: *mut conf_object_t, data: *mut lang_void)>,
pub destroy: Option<unsafe extern "C" fn(obj: *mut conf_object_t, data: *mut lang_void)>,
pub get_value: Option<unsafe extern "C" fn(obj: *mut conf_object_t, data: *mut lang_void) -> attr_value_t>,
pub set_value: Option<unsafe extern "C" fn(obj: *mut conf_object_t, value: attr_value_t) -> *mut lang_void>,
pub describe: Option<unsafe extern "C" fn(obj: *mut conf_object_t, data: *mut lang_void) -> *mut c_char>,
pub slot: c_uint,
}
Fields§
§name: *const c_char
identifier, unique within the conf_class (malloced)
conf_class: *mut conf_class_t
conf class this event class belongs to; posting object must belong to this class.
flags: event_class_flag_t
§callback: Option<unsafe extern "C" fn(obj: *mut conf_object_t, data: *mut lang_void)>
function called when event expires
destroy: Option<unsafe extern "C" fn(obj: *mut conf_object_t, data: *mut lang_void)>
function called when the event is removed without expiry. May be null. Must not access the Simics configuration in any way!
get_value: Option<unsafe extern "C" fn(obj: *mut conf_object_t, data: *mut lang_void) -> attr_value_t>
convert event data to an attribute value. May be null if flags has Sim_EC_Notsaved set. Event should not be saved if return value is invalid.
set_value: Option<unsafe extern "C" fn(obj: *mut conf_object_t, value: attr_value_t) -> *mut lang_void>
convert attribute value to event data. May be null if flags has Sim_EC_Notsaved set.
describe: Option<unsafe extern "C" fn(obj: *mut conf_object_t, data: *mut lang_void) -> *mut c_char>
human-readable event description. The returned string must be malloced; it will be freed by the caller.
slot: c_uint
internal - absolute priority for event
Trait Implementations§
source§impl Clone for event_class
impl Clone for event_class
source§fn clone(&self) -> event_class
fn clone(&self) -> event_class
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for event_class
impl Debug for event_class
source§impl Default for event_class
impl Default for event_class
source§impl Hash for event_class
impl Hash for event_class
source§impl Ord for event_class
impl Ord for event_class
source§fn cmp(&self, other: &event_class) -> Ordering
fn cmp(&self, other: &event_class) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for event_class
impl PartialEq for event_class
source§impl PartialOrd for event_class
impl PartialOrd for event_class
impl Copy for event_class
impl Eq for event_class
impl StructuralPartialEq for event_class
Auto Trait Implementations§
impl Freeze for event_class
impl RefUnwindSafe for event_class
impl !Send for event_class
impl !Sync for event_class
impl Unpin for event_class
impl UnwindSafe for event_class
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)