pub trait EventReason{
type Architecture: Architecture + ?Sized;
// Required methods
fn as_memory_access(
&self,
) -> Option<&impl EventMemoryAccess<Architecture = Self::Architecture>>;
fn as_interrupt(
&self,
) -> Option<&impl EventInterrupt<Architecture = Self::Architecture>>;
fn as_software_breakpoint(
&self,
) -> Option<&impl EventInterrupt<Architecture = Self::Architecture>>;
}Expand description
The reason for a VM exit or similar event, allowing for type-safe access to specific event details.
Required Associated Types§
Sourcetype Architecture: Architecture + ?Sized
type Architecture: Architecture + ?Sized
The specific CPU architecture implementation.
Required Methods§
Sourcefn as_memory_access(
&self,
) -> Option<&impl EventMemoryAccess<Architecture = Self::Architecture>>
fn as_memory_access( &self, ) -> Option<&impl EventMemoryAccess<Architecture = Self::Architecture>>
If the event was caused by a memory access, returns the details of that access.
Sourcefn as_interrupt(
&self,
) -> Option<&impl EventInterrupt<Architecture = Self::Architecture>>
fn as_interrupt( &self, ) -> Option<&impl EventInterrupt<Architecture = Self::Architecture>>
If the event was caused by an interrupt, returns the details of that interrupt.
Sourcefn as_software_breakpoint(
&self,
) -> Option<&impl EventInterrupt<Architecture = Self::Architecture>>
fn as_software_breakpoint( &self, ) -> Option<&impl EventInterrupt<Architecture = Self::Architecture>>
If the event was caused by a software breakpoint, returns the details of that breakpoint.
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.