Struct holmes::engine::types::Fact
[−]
[src]
pub struct Fact { pub pred_name: String, pub args: Vec<Value>, }
A Fact
is a particular filling of a Predicate
's slots such that it is
considered true.
Following the Predicate
example,
foo(3, "argblarg")
would be constructed as
use holmes::pg::dyn::values::ToValue; use holmes::engine::types::Fact; Fact { pred_name : "foo".to_string(), args : vec![3.to_value(), "argblarg".to_value()] };
Fields
pred_name: String
Predicate name
args: Vec<Value>
Slot values which make the predicate true
Trait Implementations
impl PartialEq for Fact
[src]
fn eq(&self, __arg_0: &Fact) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Fact) -> bool
This method tests for !=
.
impl Clone for Fact
[src]
fn clone(&self) -> Fact
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Fact
[src]
impl Hash for Fact
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more