Trait virt::state::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§
sourcefn is_present(caps: &C) -> bool
fn is_present(caps: &C) -> bool
Returns whether this state is present for the partition, based on the partition capabilities.
Provided Methods§
sourcefn can_compare(_caps: &C) -> bool
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).
Object Safety§
This trait is not object safe.