Skip to main content

VmiEventControl

Trait VmiEventControl 

Source
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§

Source

fn monitor_enable( &self, option: <Self::Architecture as Architecture>::EventMonitor, ) -> Result<(), VmiError>

Enables monitoring of specific events.

Source

fn monitor_disable( &self, option: <Self::Architecture as Architecture>::EventMonitor, ) -> Result<(), VmiError>

Disables monitoring of specific events.

Source

fn events_pending(&self) -> usize

Returns the number of pending events.

Source

fn event_processing_overhead(&self) -> Duration

Returns the time spent processing events.

Source

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.

Implementors§