Struct holmes::engine::types::Clause [] [src]

pub struct Clause {
    pub pred_name: String,
    pub args: Vec<(Projection, MatchExpr)>,
}

A Clause to be matched against, as you would see in the body of a datalog rule.

Continuing with our running example,

foo(_, x)

(match all foos, bind the second slot to x) would be constructed as

use holmes::engine::types::{Clause,MatchExpr,Projection};
Clause {
  pred_name : "foo".to_string(),
  args : vec![(Projection::Slot(0), MatchExpr::Unbound),
              (Projection::Slot(1), MatchExpr::Var(0))]
};

Fields

Name of the predicate to match against

List of how to restrict or bind each slot

Trait Implementations

impl PartialEq for Clause
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Clause
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Clause
[src]

Formats the value using the given formatter.

impl Hash for Clause
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Eq for Clause
[src]