pub struct ProofVerifier { /* private fields */ }Expand description
A utility for verifying the correctness and integrity of a LogicProof.
The ProofVerifier checks that a proof adheres to logical principles,
refers to known rules (if provided), and has not been tampered with.
Implementations§
Source§impl ProofVerifier
impl ProofVerifier
Sourcepub fn add_rule(&mut self, rule: Rule)
pub fn add_rule(&mut self, rule: Rule)
Adds a single Rule to the verifier’s set of known rules.
These rules are used when check_rules is enabled in VerifyOptions.
§Arguments
rule- TheRuleto add.
Sourcepub fn add_rules(&mut self, rules: &[Rule])
pub fn add_rules(&mut self, rules: &[Rule])
Adds multiple Rules from a slice to the verifier’s set of known rules.
§Arguments
rules- A slice ofRules to add.
Sourcepub fn with_options(self, options: VerifyOptions) -> Self
pub fn with_options(self, options: VerifyOptions) -> Self
Sourcepub fn verify(&self, proof: &LogicProof) -> VerifyResult
pub fn verify(&self, proof: &LogicProof) -> VerifyResult
Verifies a given LogicProof against the verifier’s configuration and known rules.
This is the main entry point for proof verification. It checks hash integrity (if enabled), validates each step, and ensures the conclusion logically follows.
§Arguments
proof- TheLogicProofto verify.
§Returns
A VerifyResult indicating whether the proof is valid and listing any errors or warnings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProofVerifier
impl !RefUnwindSafe for ProofVerifier
impl Send for ProofVerifier
impl Sync for ProofVerifier
impl Unpin for ProofVerifier
impl UnsafeUnpin for ProofVerifier
impl !UnwindSafe for ProofVerifier
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