virt::state

Trait StateElement

Source
pub trait StateElement<C, V>: Sized + Inspect {
    // Required methods
    fn is_present(caps: &C) -> bool;
    fn at_reset(caps: &C, vp: &V) -> Self;

    // Provided method
    fn can_compare(_caps: &C) -> bool { ... }
}

Required Methods§

Source

fn is_present(caps: &C) -> bool

Returns whether this state is present for the partition, based on the partition capabilities.

Source

fn at_reset(caps: &C, vp: &V) -> Self

Returns the value at VM reset.

Provided Methods§

Source

fn can_compare(_caps: &C) -> bool

Returns whether it’s possible to read this value and compare it to an expected value.

This will be false when the value may change as soon as its set (e.g., a timestamp counter for hypervisors that cannot freeze time).

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§

Source§

impl StateElement<Aarch64PartitionCapabilities, Aarch64VpInfo> for virt::aarch64::vp::Registers

Source§

impl StateElement<Aarch64PartitionCapabilities, Aarch64VpInfo> for SystemRegisters

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for HypercallMsrs

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for ReferenceTime

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for ReferenceTscPage

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Activity

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Apic

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Cet

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for CetSs

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for DebugRegisters

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Mtrrs

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Pat

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for virt::x86::vp::Registers

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for SynicEventFlagsPage

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for SynicMessagePage

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for SynicMessageQueues

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for SynicTimers

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for SyntheticMsrs

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Tsc

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for TscAux

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for VirtualMsrs

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Xcr0

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Xsave

Source§

impl StateElement<X86PartitionCapabilities, X86VpInfo> for Xss