Enum runs_inside_qemu::QemuCertainty[][src]

pub enum QemuCertainty {
    DefinitelyNot,
    Maybe,
    VeryLikely,
}
Expand description

Result of runs_inside_qemu that tells with what certainty the code runs inside QEMU.

Variants

DefinitelyNot

The code definitely doesn’t run inside QEMU, because the Hypervisor-flag is not set.

Maybe

The code maybe runs inside QEMU. This is returned if the application runs inside KVM as hypervisor, but the CPU is not QEMU. If you know, that your development setup only uses QEMU/KVM as Hypervisor, this is equal to Self::VeryLikely.

This happens, if you use something like “-cpu host” instead of “-cpu qemu64” as QEMU option.

VeryLikely

The information obtained by CPUID clearly states, that the code runs inside QEMU. Be aware, that Hypervisors could implement similar behaviour as QEMU does.

High is the case, if the Hypervisor ID is the one from QEMU or if the Hypervisor-ID is KVM and the ID of the CPU brand string contains QEMU.

Implementations

Returns if certainty is low/definitely not.

Returns if certainty is high/very likely.

Returns if certainty is maybe or high.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.