Skip to main content

FixpointError

Enum FixpointError 

Source
pub enum FixpointError {
    RuleNotForTarget {
        rule_index: usize,
        observed: String,
        expected: String,
    },
    HeadArityMismatch {
        rule_index: usize,
        observed_arity: usize,
        expected_arity: usize,
    },
    TargetPredicateInBaseRelations {
        name: String,
    },
    RuleEval {
        rule_index: usize,
        source: RefEvalError,
    },
    MaxIterationsExceeded {
        limit: usize,
        observed_size: usize,
    },
    TargetSchemaIndeterminable,
    InvalidMaxIterations,
}
Expand description

Errors surfaced by evaluate_fixpoint.

Variants§

§

RuleNotForTarget

A rule’s head predicate did not equal target_predicate. The fixpoint evaluator only accepts rules that contribute to the named target.

Fields

§rule_index: usize

Index of the offending rule in the input slice.

§observed: String

Head predicate observed.

§expected: String

Expected target predicate.

§

HeadArityMismatch

Two rules disagreed on the target predicate’s head arity. Surfaced separately from the per-row arity check so the caller sees the rule-level shape mismatch directly rather than as a downstream RelationRowArityMismatch.

Fields

§rule_index: usize

Index of the offending rule in the input slice.

§observed_arity: usize

Head arity observed on this rule.

§expected_arity: usize

Head arity established by the first non-empty-head rule.

§

TargetPredicateInBaseRelations

target_predicate was already present in base_relations. The fixpoint constructs the target relation; allowing base_relations to seed it would silently shadow the caller’s seed on the first iteration. If you want a seed, encode it as a base-case rule.

Fields

§name: String

The target predicate name as supplied.

§

RuleEval

A rule failed evaluation. Wraps the per-rule error from evaluate_rule with the rule’s index in the input slice for diagnostic precision.

Fields

§rule_index: usize

Index in the input slice.

§source: RefEvalError

The wrapped per-rule error.

§

MaxIterationsExceeded

The fixpoint did not converge within FixpointConfig::max_iterations.

Fields

§limit: usize

The configured cap.

§observed_size: usize

Size of the derived target relation at the cap.

§

TargetSchemaIndeterminable

No supplied rule produced a head whose arity could be inferred — caller supplied an empty rules slice or every rule had an empty head.

§

InvalidMaxIterations

max_iterations was zero. Must be ≥ 1.

Trait Implementations§

Source§

impl Clone for FixpointError

Source§

fn clone(&self) -> FixpointError

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FixpointError

Source§

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

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

impl PartialEq for FixpointError

Source§

fn eq(&self, other: &FixpointError) -> 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 StructuralPartialEq for FixpointError

Auto Trait Implementations§

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> 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, 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.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,