Skip to main content

Unmet

Enum Unmet 

Source
#[non_exhaustive]
pub enum Unmet { Atom { atom: Atom, expected: bool, derived: bool, }, Equality { left: String, right: String, expected: bool, }, Comparison { condition: String, left: f64, right: f64, expected: bool, }, NoneOf { condition: String, alternatives: Vec<Unmet>, omitted: usize, }, }
Expand description

The part of a condition that does not hold, as specific as the condition allows.

A conjunction reports its first failing conjunct, a universal quantifier its first failing instance. A disjunction or existential quantifier has no single culprit and reports Unmet::NoneOf with each alternative.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Atom

A ground atom has the wrong truth value.

Fields

§atom: Atom

The atom.

§expected: bool

The truth value the condition needs.

§derived: bool

true if the atom is a derived predicate, so its rule decides its value.

§

Equality

An equality (= a b) has the wrong truth value.

Fields

§left: String

The left object.

§right: String

The right object.

§expected: bool

true if the condition needs the objects to be the same.

§

Comparison

A numeric comparison has the wrong truth value.

Fields

§condition: String

The comparison, ground, such as (>= (fuel t1) 5).

§left: f64

The value of the left side.

§right: f64

The value of the right side.

§expected: bool

The truth value the condition needs.

§

NoneOf

No alternative of a disjunction, existential quantifier or implication holds.

Fields

§condition: String

The condition, ground as far as the enclosing bindings go.

§alternatives: Vec<Unmet>

Why each alternative fails, at most MAX_ALTERNATIVES of them.

§omitted: usize

The number of failing alternatives left out of alternatives.

Implementations§

Source§

impl Unmet

Source

pub fn advice(&self) -> String

Returns a repair hint, such as (Set (at t1 shop) to true).

Trait Implementations§

Source§

impl Clone for Unmet

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Unmet

Source§

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

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

impl Display for Unmet

Source§

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

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

impl PartialEq for Unmet

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Unmet

Auto Trait Implementations§

§

impl Forget for Unmet

§

impl Freeze for Unmet

§

impl Move for Unmet

§

impl RefUnwindSafe for Unmet

§

impl Send for Unmet

§

impl Sync for Unmet

§

impl Unpin for Unmet

§

impl UnsafeUnpin for Unmet

§

impl UnwindSafe for Unmet

Blanket Implementations§

Source§

impl<V, T, O> Accept<V, T, O> for T
where V: Visitor<T, O>,

Source§

fn accept(&self, v: &V) -> O

Lets the visitor v visit self.
Source§

impl<V, T, O> AcceptMut<V, T, O> for T
where V: VisitorMut<T, O>,

Source§

fn accept_mut(&self, v: &mut V) -> O

Lets the mutable visitor v visit self.
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.