pub struct ProofGraphNode {
pub key: FactKey,
pub handle: Option<FactHandle>,
pub justifications: Vec<Justification>,
pub dependents: HashSet<FactHandle>,
pub valid: bool,
pub generation: u64,
pub bindings: HashMap<String, Value>,
}Expand description
A node in the proof graph representing a proven fact
Fields§
§key: FactKeyUnique key for this fact
handle: Option<FactHandle>Fact handle from IncrementalEngine (if inserted logically)
justifications: Vec<Justification>All justifications (ways this fact was proven)
dependents: HashSet<FactHandle>Dependents (facts that depend on this fact as premise)
valid: boolWhether this fact is currently valid
generation: u64Generation when last validated
bindings: HashMap<String, Value>Variable bindings (if any) associated with this proof
Implementations§
Source§impl ProofGraphNode
impl ProofGraphNode
Sourcepub fn add_justification(
&mut self,
rule_name: String,
premises: Vec<FactHandle>,
premise_keys: Vec<String>,
generation: u64,
)
pub fn add_justification( &mut self, rule_name: String, premises: Vec<FactHandle>, premise_keys: Vec<String>, generation: u64, )
Add a justification
Sourcepub fn has_valid_justifications(&self) -> bool
pub fn has_valid_justifications(&self) -> bool
Check if this node has any valid justifications
Sourcepub fn remove_justifications_with_premise(
&mut self,
premise_handle: &FactHandle,
) -> bool
pub fn remove_justifications_with_premise( &mut self, premise_handle: &FactHandle, ) -> bool
Remove a justification involving a retracted premise
Trait Implementations§
Source§impl Clone for ProofGraphNode
impl Clone for ProofGraphNode
Source§fn clone(&self) -> ProofGraphNode
fn clone(&self) -> ProofGraphNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProofGraphNode
impl RefUnwindSafe for ProofGraphNode
impl Send for ProofGraphNode
impl Sync for ProofGraphNode
impl Unpin for ProofGraphNode
impl UnwindSafe for ProofGraphNode
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