pub enum OracleMode {
NotRun,
ReferenceZic,
ReferenceZdump,
StructuralDecode,
Unavailable(String),
}Expand description
Which oracle backed a report’s verdicts (T15.2 — CONTRACT.TYPING). The single owner type for the
oracle-mode vocabulary: as of T15.2a, OracleResult::mode is this enum too (no
claim-bearing path emits the vocabulary as a free string). Reports render mode_str
(canonical snake_case); the zic-rs-compile-manifest-v8 oracle.mode field renders
manifest_str, a boundary-only compatibility shim that preserves the one
legacy value ("not-run") the manifest has ever emitted — removal plan: canonicalize to mode_str
at the next manifest major bump (a drift test pins that the shim diverges for that one value only).
The rule it enforces: oracle absence is visible — a report renders Unavailable(reason) (→
skipped_with_reason), never silence, so a verdict can never silently weaken when reference tools
are missing.
Variants§
NotRun
No oracle was consulted by design (e.g. support-report is compile-coverage, not behaviour).
ReferenceZic
Reference zic’s emitted bytes were the oracle (e.g. structural-report).
ReferenceZdump
Reference zdump’s decoded behaviour was the oracle (the compare zdump mode).
StructuralDecode
A decoded-TZif structural comparison (the compare structural mode).
The required oracle tool was unavailable; the verdict was skipped, with this reason.
Implementations§
Source§impl OracleMode
impl OracleMode
Sourcepub fn skipped_with_reason(&self) -> Option<&str>
pub fn skipped_with_reason(&self) -> Option<&str>
The reason an oracle was skipped, when (and only when) it was Unavailable.
Sourcepub fn manifest_str(&self) -> &'static str
pub fn manifest_str(&self) -> &'static str
The zic-rs-compile-manifest-v8 boundary rendering (T15.2a compatibility shim). The manifest
path only ever holds NotRun and has historically emitted "not-run"
(hyphenated); that one value is preserved here for back-compat. Every other variant has no legacy
manifest form (they never appeared there), so this is identical to mode_str for
them — i.e. the shim diverges for exactly one value, which a drift test pins. Removal plan:
canonicalize to mode_str at the next manifest major bump.
Sourcepub fn to_json_field(&self) -> String
pub fn to_json_field(&self) -> String
Render as the report’s oracle_mode object: { "mode": …, "skipped_with_reason": …|null }.
Absence is always visible — skipped_with_reason is non-null exactly when the oracle was missing.
Trait Implementations§
Source§impl Clone for OracleMode
impl Clone for OracleMode
Source§fn clone(&self) -> OracleMode
fn clone(&self) -> OracleMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OracleMode
impl Debug for OracleMode
impl Eq for OracleMode
Source§impl PartialEq for OracleMode
impl PartialEq for OracleMode
Source§fn eq(&self, other: &OracleMode) -> bool
fn eq(&self, other: &OracleMode) -> bool
self and other values to be equal, and is used by ==.