Skip to main content

ProofGraph

Struct ProofGraph 

Source
pub struct ProofGraph {
    pub schema_version: String,
    pub contract_id: Uuid,
    pub evidence: BTreeMap<Uuid, Evidence>,
    pub links: Vec<EvidenceLink>,
    pub final_workspace_generation: Option<u64>,
    pub final_state_binding: Option<String>,
    pub termination: Option<ProofTermination>,
}
Expand description

Evidence nodes and their links to contract criteria.

Fields§

§schema_version: String

Graph schema version.

§contract_id: Uuid

Contract this graph evaluates.

§evidence: BTreeMap<Uuid, Evidence>

Evidence keyed for deterministic serialization.

§links: Vec<EvidenceLink>

Directed evidence-to-criterion edges.

§final_workspace_generation: Option<u64>

Final workspace generation against which fresh evidence is evaluated.

§final_state_binding: Option<String>

Canonical digest or other binding for the final workspace state.

§termination: Option<ProofTermination>

Runtime terminal state that prevents normal completion evaluation.

Implementations§

Source§

impl ProofGraph

Source

pub fn new(contract_id: Uuid) -> Self

Creates an empty graph for a contract.

Source

pub fn bind_final_workspace( &mut self, generation: u64, state_binding: Option<String>, )

Sets the final workspace state used by freshness requirements.

Source

pub fn block(&mut self, reason: impl Into<String>)

Records a policy, authorization, or external dependency blocker.

Source

pub fn cancel(&mut self, reason: impl Into<String>)

Records user or client cancellation.

Source

pub fn record(&mut self, evidence: Evidence) -> Uuid

Adds evidence and returns its identifier.

Links existing evidence to an existing criterion.

Source

pub fn evaluate_detailed( &self, contract: &mut TaskContract, ) -> Result<ProofEvaluation, ProofError>

Recomputes every non-waived criterion and returns detailed derivation data.

Source

pub fn evaluate( &self, contract: &mut TaskContract, ) -> Result<RunOutcome, ProofError>

Recomputes every non-waived criterion and returns the overall outcome.

Trait Implementations§

Source§

impl Clone for ProofGraph

Source§

fn clone(&self) -> ProofGraph

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProofGraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProofGraph

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ProofGraph

Source§

fn eq(&self, other: &ProofGraph) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ProofGraph

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ProofGraph

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.