RuleApplication

Struct RuleApplication 

Source
pub struct RuleApplication<Bound> {
    pub rule_index: usize,
    pub instantiations: Vec<Bound>,
}
Expand description

An element of a deductive proof. Proofs can be transmitted and later validatated as long as the validator assumes the same rule list as the prover.

Unbound variables are bound to the values in instantiations. They are bound in order of initial appearance.

Given the rule:

ifall
  [?z ex:foo ?x DG]
then
  [?x ex:bar ?z DG]

and the RuleApplication:

RuleApplication {
  rule_index: 0,
  instantiations: vec!["foer", "bary"],
}

The rule application represents the deductive proof:

[foer ex:foo bary DG]
therefore
[bary ex:bar foer DG]

Fields§

§rule_index: usize

The index of the rule in the implicitly associated rule list.

§instantiations: Vec<Bound>

Bindings for unbound names in the rule in order of appearance.

Trait Implementations§

Source§

impl<Bound: Debug> Debug for RuleApplication<Bound>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Bound: PartialEq> PartialEq for RuleApplication<Bound>

Source§

fn eq(&self, other: &RuleApplication<Bound>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Bound: Eq> Eq for RuleApplication<Bound>

Source§

impl<Bound> StructuralPartialEq for RuleApplication<Bound>

Auto Trait Implementations§

§

impl<Bound> Freeze for RuleApplication<Bound>

§

impl<Bound> RefUnwindSafe for RuleApplication<Bound>
where Bound: RefUnwindSafe,

§

impl<Bound> Send for RuleApplication<Bound>
where Bound: Send,

§

impl<Bound> Sync for RuleApplication<Bound>
where Bound: Sync,

§

impl<Bound> Unpin for RuleApplication<Bound>
where Bound: Unpin,

§

impl<Bound> UnwindSafe for RuleApplication<Bound>
where Bound: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.