#[non_exhaustive]pub enum Verdict {
ColdStart,
Stable,
Warning,
Bust,
FullBust,
Unknown,
Other(String),
}Expand description
A step’s prompt-cache verdict. The rules that choose it are in
CONTRACT.md and are computed over the step’s whole session in time
order.
Unknown is a real verdict: the cache’s health cannot be judged for
this step. Other is a value this version does not know (a newer
verdict); show it as received rather than treating it as Unknown.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ColdStart
The session’s first step.
Stable
Retention of at least 0.95, or no usable earlier step to compare.
Warning
Retention of at least 0.80 and below 0.95.
Bust
Retention below 0.80 with a positive cache read.
FullBust
A cache read of zero.
Unknown
The cache’s health cannot be judged for this step.
Other(String)
A value this version of the contract does not know, kept
exactly as received. Build values from strings with
from_wire, so a known string never lands here.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Verdict
impl<'de> Deserialize<'de> for Verdict
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Verdict
impl StructuralPartialEq for Verdict
Auto Trait Implementations§
impl Freeze for Verdict
impl RefUnwindSafe for Verdict
impl Send for Verdict
impl Sync for Verdict
impl Unpin for Verdict
impl UnsafeUnpin for Verdict
impl UnwindSafe for Verdict
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