pub struct ProofCarryingCode { /* private fields */ }Expand description
Proof-carrying code certificate
This combines code with proofs of its safety properties.
Implementations§
Source§impl ProofCarryingCode
impl ProofCarryingCode
Sourcepub fn add_property(&mut self, property: SafetyProperty)
pub fn add_property(&mut self, property: SafetyProperty)
Add a safety property to be verified
Sourcepub fn add_vc(&mut self, vc: VerificationCondition)
pub fn add_vc(&mut self, vc: VerificationCondition)
Add a verification condition
Sourcepub fn attach_proof(&mut self, vc_id: &str, proof_node: ProofNodeId)
pub fn attach_proof(&mut self, vc_id: &str, proof_node: ProofNodeId)
Attach a proof for a verification condition
Sourcepub fn properties(&self) -> &[SafetyProperty]
pub fn properties(&self) -> &[SafetyProperty]
Get the certified properties
Sourcepub fn verification_conditions(&self) -> &[VerificationCondition]
pub fn verification_conditions(&self) -> &[VerificationCondition]
Get the verification conditions
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if all VCs have proofs
Sourcepub fn verified_count(&self) -> usize
pub fn verified_count(&self) -> usize
Get the number of verified VCs
Sourcepub fn total_vc_count(&self) -> usize
pub fn total_vc_count(&self) -> usize
Get the total number of VCs
Sourcepub fn to_certificate(&self) -> String
pub fn to_certificate(&self) -> String
Generate a human-readable certificate
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProofCarryingCode
impl RefUnwindSafe for ProofCarryingCode
impl Send for ProofCarryingCode
impl Sync for ProofCarryingCode
impl Unpin for ProofCarryingCode
impl UnsafeUnpin for ProofCarryingCode
impl UnwindSafe for ProofCarryingCode
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