Skip to main content

TermBuilderError

Enum TermBuilderError 

Source
pub enum TermBuilderError {
    MissingColumn {
        reason: String,
    },
    ColumnNotFound {
        name: String,
        role: Option<String>,
        available: Vec<String>,
        similar: Vec<String>,
        tsv_hint: bool,
    },
    IncompatibleConfig {
        reason: String,
    },
    InvalidOption {
        reason: String,
    },
    UnsupportedFeature {
        reason: String,
    },
    DegenerateData {
        reason: String,
    },
    MalformedFormula {
        reason: String,
    },
}
Expand description

Typed errors emitted by term-builder helpers. Display reproduces the exact pre-refactor format!(...) text byte-for-byte, so callers that string-match on the message (tests, log assertions) keep working unchanged. Public-API functions still return Result<_, String> and use .to_string() shims at their boundary to stay compatible with callers in protected modules.

Variants§

§

MissingColumn

Column-resolution / column-kind lookup failures whose context is purely internal (column-kind table out-of-sync, alias map missing an entry, etc.). User-facing “this formula references a column that doesn’t exist” diagnostics use the dedicated ColumnNotFound variant so the FFI boundary can lift the structured payload into a Python ColumnNotFoundError without parsing prose.

Fields

§reason: String
§

ColumnNotFound

A formula referenced a column that is not present in the input data. Mirrors DataError::ColumnNotFound field-for-field so the conversion across module boundaries is a pure data move (no re-derivation, no string re-parsing). Public callers see byte-identical Display output to the legacy missing_column_message text.

Fields

§name: String
§available: Vec<String>
§similar: Vec<String>
§tsv_hint: bool
§

IncompatibleConfig

User-specified configuration is internally inconsistent (e.g. too few variables for a smooth type, conflicting size options, requested basis dimension below the polynomial nullspace).

Fields

§reason: String
§

InvalidOption

Option parsing failure: malformed numeric expression, unknown option key, out-of-range integer, list-length mismatch, etc.

Fields

§reason: String
§

UnsupportedFeature

User requested a feature that is intentionally not supported (unknown smooth type / method / kernel / identifiability, non-zero anchor, internal-only token, etc.).

Fields

§reason: String
§

DegenerateData

Input data is degenerate for the requested term (constant column, non-finite categorical entries, …).

Fields

§reason: String
§

MalformedFormula

Term-collection-stage formula error — a node that the caller was supposed to resolve upstream reached the builder.

Fields

§reason: String

Trait Implementations§

Source§

impl Clone for TermBuilderError

Source§

fn clone(&self) -> TermBuilderError

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 TermBuilderError

Source§

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

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

impl Display for TermBuilderError

Source§

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

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

impl From<DataError> for TermBuilderError

Typed lift from data-layer errors. DataError::ColumnNotFound becomes TermBuilderError::ColumnNotFound field-for-field — no stringification, no information loss — so the FFI boundary downstream can dispatch on the typed variant. Other DataError variants degrade into MissingColumn since they describe column-resolution-time failures without a dedicated structured destination.

Source§

fn from(err: DataError) -> Self

Converts to this type from the input type.
Source§

impl From<String> for TermBuilderError

Catchall lift for the term-builder’s internal Result<_, String> helpers (numeric expression parsing, option lookup, boundary-condition parsing, …) that flow into build_termspec via ?. Maps to IncompatibleConfig, which is the most appropriate generic bucket for option/config-style failures — leaf sites that emit structured payloads (From<DataError> for column-not-found) bypass this fallback.

Source§

fn from(reason: String) -> Self

Converts to this type from the input type.
Source§

impl From<TermBuilderError> for String

Source§

fn from(err: TermBuilderError) -> String

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

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> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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 = 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V