Struct QualityRuntimePolicy
pub struct QualityRuntimePolicy { /* private fields */ }Expand description
Fixed-memory state. Receipt storage is a ring; no sample allocates and no policy path changes semantic or simulation state.
Implementations§
§impl QualityRuntimePolicy
impl QualityRuntimePolicy
pub fn new(
initial_tier: QualityTier,
config: RuntimeQualityConfig,
) -> QualityRuntimePolicy
pub fn new( initial_tier: QualityTier, config: RuntimeQualityConfig, ) -> QualityRuntimePolicy
Creates a policy starting at initial_tier under config.
pub fn tier(&self) -> QualityTier
pub fn tier(&self) -> QualityTier
Current quality tier.
pub fn counters(&self) -> QualityRuntimeCounters
pub fn counters(&self) -> QualityRuntimeCounters
Step/oscillation counters.
pub const fn performance_evidence(&self) -> PerformanceEvidence
pub const fn performance_evidence(&self) -> PerformanceEvidence
Return measured performance evidence for feeding a later capability snapshot. Unknown or
inconsistent samples remain unadmitted by PerformanceEvidence::gate.
pub fn receipt_storage(
&self,
) -> (&[Option<QualityRuntimeReceipt>; 16], usize, usize)
pub fn receipt_storage( &self, ) -> (&[Option<QualityRuntimeReceipt>; 16], usize, usize)
Physical ring storage and its oldest index. Inspect at most receipt_count() entries,
wrapping at the end of the array to enumerate oldest-to-newest without allocation.
pub fn receipt_count(&self) -> usize
pub fn receipt_count(&self) -> usize
Quality decisions emitted so far.
pub fn observe(
&mut self,
sample: RuntimeQualitySample,
) -> RuntimeQualityDecision
pub fn observe( &mut self, sample: RuntimeQualitySample, ) -> RuntimeQualityDecision
Observes sample and returns the tier decision (hold/step-up/step-down).
Trait Implementations§
§impl Clone for QualityRuntimePolicy
impl Clone for QualityRuntimePolicy
§fn clone(&self) -> QualityRuntimePolicy
fn clone(&self) -> QualityRuntimePolicy
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 QualityRuntimePolicy
impl RefUnwindSafe for QualityRuntimePolicy
impl Send for QualityRuntimePolicy
impl Sync for QualityRuntimePolicy
impl Unpin for QualityRuntimePolicy
impl UnsafeUnpin for QualityRuntimePolicy
impl UnwindSafe for QualityRuntimePolicy
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more