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.
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.
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).
InvalidOption
Option parsing failure: malformed numeric expression, unknown option key, out-of-range integer, list-length mismatch, etc.
UnsupportedFeature
User requested a feature that is intentionally not supported (unknown smooth type / method / kernel / identifiability, non-zero anchor, internal-only token, etc.).
DegenerateData
Input data is degenerate for the requested term (constant column, non-finite categorical entries, …).
MalformedFormula
Term-collection-stage formula error — a node that the caller was supposed to resolve upstream reached the builder.
Trait Implementations§
Source§impl Clone for TermBuilderError
impl Clone for TermBuilderError
Source§fn clone(&self) -> TermBuilderError
fn clone(&self) -> TermBuilderError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TermBuilderError
impl Debug for TermBuilderError
Source§impl Display for TermBuilderError
impl Display for TermBuilderError
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.
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§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.
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§impl From<TermBuilderError> for String
impl From<TermBuilderError> for String
Source§fn from(err: TermBuilderError) -> String
fn from(err: TermBuilderError) -> String
Auto Trait Implementations§
impl Freeze for TermBuilderError
impl RefUnwindSafe for TermBuilderError
impl Send for TermBuilderError
impl Sync for TermBuilderError
impl Unpin for TermBuilderError
impl UnsafeUnpin for TermBuilderError
impl UnwindSafe for TermBuilderError
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.