pub struct ProofNode {
pub goal: String,
pub rule_name: Option<String>,
pub bindings: HashMap<String, String>,
pub children: Vec<ProofNode>,
pub depth: usize,
pub proven: bool,
pub node_type: ProofNodeType,
}Expand description
Represents a single node in the proof tree
Fields§
§goal: StringThe goal that was proven at this node
rule_name: Option<String>Name of the rule that was used (if any)
bindings: HashMap<String, String>Variable bindings at this node
children: Vec<ProofNode>Child nodes (sub-goals that were proven)
depth: usizeDepth in the proof tree
proven: boolWhether this goal was proven successfully
node_type: ProofNodeTypeType of proof node
Implementations§
Source§impl ProofNode
impl ProofNode
Sourcepub fn set_bindings(&mut self, bindings: &Bindings)
pub fn set_bindings(&mut self, bindings: &Bindings)
Set bindings from Bindings object
Sourcepub fn set_bindings_map(&mut self, bindings: HashMap<String, String>)
pub fn set_bindings_map(&mut self, bindings: HashMap<String, String>)
Set bindings from HashMap
Sourcepub fn print_tree(&self, indent: usize)
pub fn print_tree(&self, indent: usize)
Print the proof tree
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Count total nodes
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProofNode
impl<'de> Deserialize<'de> for ProofNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProofNode
impl RefUnwindSafe for ProofNode
impl Send for ProofNode
impl Sync for ProofNode
impl Unpin for ProofNode
impl UnwindSafe for ProofNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more