Trait EventReason

Source
pub trait EventReason
where Self: Debug + Clone + Copy,
{ 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§

Source

type Architecture: Architecture + ?Sized

The specific CPU architecture implementation.

Required Methods§

Source

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.

Source

fn as_interrupt( &self, ) -> Option<&impl EventInterrupt<Architecture = Self::Architecture>>

If the event was caused by an interrupt, returns the details of that interrupt.

Source

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.

Implementors§