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).
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.