pub struct Verified {
pub id: String,
pub cert: Certificate,
pub expires_at: UtcDateTime,
}Expand description
A certificate whose signature verified against a trusted key.
Fields§
§id: Stringsha256:<hex> of the signed certificate’s JCS bytes.
cert: Certificate§expires_at: UtcDateTimeImplementations§
Source§impl Verified
impl Verified
Sourcepub fn threshold_for(&self, segment: Option<&str>) -> f64
pub fn threshold_for(&self, segment: Option<&str>) -> f64
The threshold for a case in segment: a certified segment’s own, else the top-level one.
Sourcepub fn is_expired(&self, now: UtcDateTime) -> bool
pub fn is_expired(&self, now: UtcDateTime) -> bool
Whether the certificate has expired at now: now is not before its expires_at.
Sourcepub fn confidence_bins(&self) -> Option<&[f64]>
pub fn confidence_bins(&self) -> Option<&[f64]>
The bin edges of a v1.2 certificate’s confidence histograms; None before v1.2.
Sourcepub fn histogram_for(&self, segment: Option<&str>) -> Option<&Histogram>
pub fn histogram_for(&self, segment: Option<&str>) -> Option<&Histogram>
The stored confidence histogram of the cases decided by the same threshold as a case in
segment: a certified segment’s own, else the top level’s. None before v1.2, or when the
issuer withheld it.
Sourcepub fn automate_options(&self) -> Option<&[String]>
pub fn automate_options(&self) -> Option<&[String]>
The options a v1.3 certificate’s consumer automates; None before v1.3. A consumer refuses a certificate whose list differs from the options it automates (spec v1.3 §4).
Sourcepub fn automated_for(&self, segment: Option<&str>) -> Option<&Automated>
pub fn automated_for(&self, segment: Option<&str>) -> Option<&Automated>
The automated cases of the test that decides a case in segment (a certified segment’s own,
else the top level’s): their share and error. None before v1.3.
Sourcepub fn cost(&self) -> Option<&Cost>
pub fn cost(&self) -> Option<&Cost>
A v1.4 selective_cost certificate’s costs; None otherwise. A consumer refuses a certificate
whose matrix differs from the costs it is configured with (spec v1.4 §4), and reports the
bound as alpha * c_max in unit.
Sourcepub fn sequential(&self) -> Option<&Sequential>
pub fn sequential(&self) -> Option<&Sequential>
A v1.6 certificate’s attempt, pre-registration citation, records and per-class results; None before v1.6.
Sourcepub fn attempt_role(&self) -> Option<&AttemptRole>
pub fn attempt_role(&self) -> Option<&AttemptRole>
A v1.7 certificate’s role, the champion a challenger runs beside, and its delta budget; None before v1.7.
Sourcepub fn tenant(&self) -> Option<&str>
pub fn tenant(&self) -> Option<&str>
A v1.5 certificate’s tenant (equal to the expected tenant it was verified with); None before v1.5.
Sourcepub fn probabilities(&self, scores: &[f64]) -> Option<Vec<f64>>
pub fn probabilities(&self, scores: &[f64]) -> Option<Vec<f64>>
The probabilities the certificate’s calibration map gives a case’s raw scores, one per
option (spec v1.2 §1, probabilities). None when the map’s kind is not one this crate
applies (MAP_KINDS), its params do not fit that kind, or scores does not have one score
per option, or the map is dr in a certificate before v1.2, which did not define it. A
consumer refuses a certificate whose map it does not apply (spec v1.2 §4).
Sourcepub fn confidence(&self, scores: &[f64]) -> Option<f64>
pub fn confidence(&self, scores: &[f64]) -> Option<f64>
A case’s confidence: the largest of its Verified::probabilities. A case is answered when
this is at least Verified::threshold_for its segment (and the rule does not abstain on it).
Sourcepub fn temperature(&self) -> Option<f64>
pub fn temperature(&self) -> Option<f64>
The temperature of a kind: temperature calibration map; None for other kinds.