pub enum GraphError {
Show 16 variants
UnknownNode(String),
Cycle(String),
MalformedExpression(String),
DuplicateExprTarget(String),
MissingParameter {
node: String,
param: String,
},
DuplicateNodeId(String),
UnknownModelType(String),
EvalFailure(String),
XBufferStrideMismatch {
x_len: usize,
n_dims: usize,
},
DimensionalityMismatch {
first: String,
first_nd: usize,
second: String,
second_nd: usize,
},
MissingParamKey(String),
DivisionByZero,
EmptyExpression,
DatasetIndexOutOfRange {
node: String,
dataset_index: usize,
n_datasets: usize,
},
OutputBufferShape,
OutputBufferLength {
actual: usize,
expected: usize,
},
}Expand description
Errors produced by the graph compiler and executor.
Variants§
UnknownNode(String)
A node referenced by ID was not found in the compiled graph.
Triggered when user-supplied params_flat references a node that does
not exist in the graph.
Cycle(String)
A cycle was detected in the expr_edge dependency graph.
Triggered during compilation when two or more expr_edges form a
circular dependency (e.g. a → b → a).
MalformedExpression(String)
An expression string failed to lex or parse.
Triggered when an expr_edge.expression contains syntax that the
restricted grammar does not support (unknown character, unbalanced
parentheses, trailing tokens, etc.).
DuplicateExprTarget(String)
Two or more expr_edges point to the same target parameter.
Each parameter may be the target of at most one expr_edge.
MissingParameter
A required model parameter is missing from the node’s parameters map.
Triggered at compile time when the spec omits a parameter required by the model kernel.
DuplicateNodeId(String)
Two nodes in the graph share the same id.
Node IDs key the free-column layout and the per-node component map; a duplicate ID would silently corrupt both.
UnknownModelType(String)
The model_type string was not recognised by the model registry.
EvalFailure(String)
An expression evaluation failed (e.g. division by zero, missing key).
XBufferStrideMismatch
The x buffer length is not a multiple of the graph’s n_dims.
Fields
DimensionalityMismatch
The graph mixes nodes with different coordinate dimensionalities.
All nodes in a graph must share the same n_dims.
Fields
MissingParamKey(String)
A params_flat entry that is required for evaluation is missing.
Triggered when the caller’s params_flat map does not contain a key
for a parameter that the model requires.
DivisionByZero
Division by zero occurred while evaluating a tied expression.
EmptyExpression
An expression’s input was empty (no tokens after lex).
DatasetIndexOutOfRange
A dataset_index on a node points past the recorded dataset_offsets.
Triggered when a node carries dataset_index = Some(i) but the solver
has filled dataset_offsets for fewer than i + 1 datasets — indexing
would otherwise overrun dataset_offsets.
Fields
OutputBufferShape
A residual/observation/sigma buffer length disagreed with the point count.
OutputBufferLength
A reusable output buffer’s length did not match the predicted point count.
Trait Implementations§
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
Source§impl Error for GraphError
impl Error for GraphError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<GraphError> for CoreError
Map GraphError to the workspace-wide CoreError.
impl From<GraphError> for CoreError
Map GraphError to the workspace-wide CoreError.
GraphError is the structured shape the graph crate produces internally;
CoreError::Eval(String) is the legacy stringly-typed boundary the rest of
the workspace consumes. This conversion lets callers use ? to flatten a
graph-layer failure into the boundary error type without losing the
Display message.
Source§fn from(value: GraphError) -> Self
fn from(value: GraphError) -> Self
Auto Trait Implementations§
impl Freeze for GraphError
impl RefUnwindSafe for GraphError
impl Send for GraphError
impl Sync for GraphError
impl Unpin for GraphError
impl UnsafeUnpin for GraphError
impl UnwindSafe for GraphError
Blanket Implementations§
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
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.