pub struct KernelSelector { /* private fields */ }Expand description
Selects a kernel tier and demotes to the certified scalar baseline on selftest failure.
The direction is one-way on purpose. A tier that failed its selftest has produced at least one wrong answer on this machine; re-promoting it later because a subsequent check passed would be trusting the same evidence that already lied. Correctness outranks speed (G1 > G2), so the run finishes slower and correct.
Implementations§
Source§impl KernelSelector
impl KernelSelector
pub const fn new(preferred: KernelTier) -> Self
pub const fn active(&self) -> KernelTier
pub const fn demoted(&self) -> bool
Sourcepub fn on_selftest_failure(&mut self) -> Option<HealthViolation>
pub fn on_selftest_failure(&mut self) -> Option<HealthViolation>
Record a selftest failure and fall back. Idempotent; already-scalar stays scalar.
Sourcepub const fn preferred(&self) -> KernelTier
pub const fn preferred(&self) -> KernelTier
The tier that was preferred before any demotion, for reporting.
Trait Implementations§
Source§impl Clone for KernelSelector
impl Clone for KernelSelector
Source§fn clone(&self) -> KernelSelector
fn clone(&self) -> KernelSelector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KernelSelector
impl RefUnwindSafe for KernelSelector
impl Send for KernelSelector
impl Sync for KernelSelector
impl Unpin for KernelSelector
impl UnsafeUnpin for KernelSelector
impl UnwindSafe for KernelSelector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).