Struct polar_core::kb::KnowledgeBase[][src]

pub struct KnowledgeBase {
    pub constants: Bindings,
    pub rules: HashMap<Symbol, GenericRule>,
    pub sources: Sources,
    pub inline_queries: Vec<Term>,
    // some fields omitted
}
Expand description

A map of bindings: variable name → value. The VM uses a stack internally, but can translate to and from this type.

Fields

constants: Bindingsrules: HashMap<Symbol, GenericRule>sources: Sourcesinline_queries: Vec<Term>

Implementations

Return a monotonically increasing integer ID.

Wraps around at 52 bits of precision so that it can be safely coerced to an IEEE-754 double-float (f64).

Generate a new symbol.

Define a constant variable.

Return true if a constant with the given name has been defined.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.