Skip to main content

GraphError

Enum GraphError 

Source
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.

Fields

§node: String

Node identifier.

§param: String

Required parameter name that was absent.

§

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

§x_len: usize

Length of the supplied x slice.

§n_dims: usize

Expected stride (number of coordinate components per point).

§

DimensionalityMismatch

The graph mixes nodes with different coordinate dimensionalities.

All nodes in a graph must share the same n_dims.

Fields

§first: String

First (reference) node id.

§first_nd: usize

n_dims of the first node.

§second: String

Second (conflicting) node id.

§second_nd: usize

n_dims of the second node.

§

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

§node: String

Node identifier.

§dataset_index: usize

Out-of-range index value.

§n_datasets: usize

Number of recorded datasets (valid indices are 0..n_datasets).

§

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.

Fields

§actual: usize

Length of the supplied buffer.

§expected: usize

Required length (= number of points).

Trait Implementations§

Source§

impl Debug for GraphError

Source§

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

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

impl Display for GraphError

Source§

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

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

impl Error for GraphError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

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

Converts to this type from the input type.

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

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

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

§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

fn from_subset(element: &SS) -> SP

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