pub trait VmiEventControl: VmiDriver {
// Required methods
fn monitor_enable(
&self,
option: <Self::Architecture as Architecture>::EventMonitor,
) -> Result<(), VmiError>;
fn monitor_disable(
&self,
option: <Self::Architecture as Architecture>::EventMonitor,
) -> Result<(), VmiError>;
fn events_pending(&self) -> usize;
fn event_processing_overhead(&self) -> Duration;
fn wait_for_event(
&self,
timeout: Duration,
handler: impl FnMut(&VmiEvent<Self::Architecture>) -> VmiEventResponse<Self::Architecture>,
) -> Result<(), VmiError>;
}Expand description
Capability to control event monitoring and delivery.
Required Methods§
Sourcefn monitor_enable(
&self,
option: <Self::Architecture as Architecture>::EventMonitor,
) -> Result<(), VmiError>
fn monitor_enable( &self, option: <Self::Architecture as Architecture>::EventMonitor, ) -> Result<(), VmiError>
Enables monitoring of specific events.
Sourcefn monitor_disable(
&self,
option: <Self::Architecture as Architecture>::EventMonitor,
) -> Result<(), VmiError>
fn monitor_disable( &self, option: <Self::Architecture as Architecture>::EventMonitor, ) -> Result<(), VmiError>
Disables monitoring of specific events.
Sourcefn events_pending(&self) -> usize
fn events_pending(&self) -> usize
Returns the number of pending events.
Sourcefn event_processing_overhead(&self) -> Duration
fn event_processing_overhead(&self) -> Duration
Returns the time spent processing events.
Sourcefn wait_for_event(
&self,
timeout: Duration,
handler: impl FnMut(&VmiEvent<Self::Architecture>) -> VmiEventResponse<Self::Architecture>,
) -> Result<(), VmiError>
fn wait_for_event( &self, timeout: Duration, handler: impl FnMut(&VmiEvent<Self::Architecture>) -> VmiEventResponse<Self::Architecture>, ) -> Result<(), VmiError>
Waits for an event to occur and processes it with the provided handler.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.