pub struct ConformanceVector {
pub admitted: Vec<LawAxis>,
pub refused: Vec<LawAxis>,
pub unknown: Vec<LawAxis>,
pub score: Option<f64>,
pub strict_mode: bool,
pub process_quality: Option<ConformanceResult>,
pub admitted_bits: u64,
pub refused_bits: u64,
pub unknown_bits: u64,
}Expand description
Three-valued conformance state: Admitted / Refused / Unknown are distinct
sets, and Unknown never collapses into either (doing so is a defect). See the
runnable explanation and contract witness in
examples/conformance_vector_explained.rs, which asserts this law and panics
if it regresses. For the gate composing with receipt verification, see
examples/admission_pipeline.rs.
Fields§
§admitted: Vec<LawAxis>Law axes that have been admitted (evidence present and valid)
refused: Vec<LawAxis>Law axes that have been explicitly refused (evidence present, violation confirmed)
unknown: Vec<LawAxis>Law axes where admissibility cannot be determined (NEVER collapsed into admitted or refused)
score: Option<f64>Derived score: 100 * admitted / (admitted + refused + unknown), None if all unknown
strict_mode: boolWhether unknown axes block release actuation
process_quality: Option<ConformanceResult>Process quality from POWL conformance check. None until wasm4pm graduation.
admitted_bits: u64Bitmask for admitted axes (bits 0–10 = Protocol..Domain). Not serialized.
refused_bits: u64Bitmask for refused axes. Not serialized.
unknown_bits: u64Bitmask for unknown axes. Not serialized.
Implementations§
Source§impl ConformanceVector
impl ConformanceVector
pub fn all_admitted(&self) -> bool
pub fn admits_release(&self) -> bool
Sourcepub fn sync_bits_from_vecs(&mut self)
pub fn sync_bits_from_vecs(&mut self)
Recompute all three bitmasks from the Vec fields.
Call this after constructing from a struct literal or deserializing from JSON, so the internal index stays consistent.
Sourcepub fn set_admitted(&mut self, id: LawAxisId)
pub fn set_admitted(&mut self, id: LawAxisId)
Mark an axis as admitted, removing it from refused and unknown sets.
Sourcepub fn set_refused(&mut self, id: LawAxisId)
pub fn set_refused(&mut self, id: LawAxisId)
Mark an axis as refused, removing it from admitted and unknown sets.
Sourcepub fn set_unknown(&mut self, id: LawAxisId)
pub fn set_unknown(&mut self, id: LawAxisId)
Mark an axis as unknown, removing it from admitted and refused sets.
pub fn is_admitted_bit(&self, id: LawAxisId) -> bool
pub fn is_refused_bit(&self, id: LawAxisId) -> bool
pub fn is_unknown_bit(&self, id: LawAxisId) -> bool
Sourcepub fn assert_bitmask_invariants(&self)
pub fn assert_bitmask_invariants(&self)
Assert all three bitmasks are mutually disjoint.
Trait Implementations§
Source§impl Clone for ConformanceVector
impl Clone for ConformanceVector
Source§fn clone(&self) -> ConformanceVector
fn clone(&self) -> ConformanceVector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more