pub enum GateDetail {
Validate {
contracts: usize,
errors: usize,
warnings: usize,
error_messages: Vec<String>,
},
Audit {
contracts: usize,
findings: usize,
finding_messages: Vec<String>,
},
Score {
contracts: usize,
min_score: f64,
mean_score: f64,
threshold: f64,
below_threshold: Vec<String>,
},
Verify {
total_refs: usize,
existing: usize,
missing: usize,
},
Enforce {
equations_total: usize,
equations_with_pre: usize,
equations_with_post: usize,
equations_with_lean: usize,
},
ReverseCoverage {
total_pub_fns: usize,
bound_fns: usize,
unbound_fns: usize,
coverage_pct: f64,
threshold_pct: f64,
},
Composition {
edges_checked: usize,
edges_satisfied: usize,
edges_broken: usize,
},
Skipped {
reason: String,
},
}Expand description
Gate-specific detail payload.
§This enum is FROZEN at the eight variants published in provable-contracts
0.3.1 — do not add a ninth
GateDetail is public, is not #[non_exhaustive], and 0.3.1 shipped 28 example
programs that match it exhaustively. Those programs are vendored verbatim under
crates/facades/provable-contracts/compat/0.3.1/, sha256-verified against their
published checksums by scripts/check_facade_compat.sh (row R6), and compiled in
the ci job that the required gate check depends on. A ninth variant is
error[E0004] in that corpus, and the corpus cannot be edited to accommodate it —
being uneditable is the whole point of a compatibility contract. Marking the enum
#[non_exhaustive] does not help either: it makes the existing exhaustive
matches non-exhaustive, which is the same compile error for the same reason.
So the vocabulary is closed. A gate added after 0.3.1 picks the truest of these
eight for detail and carries its own shape in GateResult::extra, which is a
type 0.3.1 never names and is therefore free to grow.
Variants§
Trait Implementations§
Source§impl Clone for GateDetail
impl Clone for GateDetail
Source§fn clone(&self) -> GateDetail
fn clone(&self) -> GateDetail
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more