Skip to main content

ConfigurationError

Enum ConfigurationError 

Source
#[non_exhaustive]
pub enum ConfigurationError {
Show 16 variants ReadConfigurationFile { path: PathBuf, source: Error, }, ParseConfigurationFile { path: PathBuf, source: Error, }, InvalidConfigurationDocument { path: PathBuf, reason: String, }, DuplicateConfigurationKey { path: PathBuf, key: String, }, FixedSweepKeyConflict { key: String, fixed_path: PathBuf, sweep_path: PathBuf, }, TaskCountOverflow { axis: String, }, TaskOrdinalOutOfBounds { ordinal: u64, task_count: u64, }, UnknownSweepParameter { key: String, }, EncodeTaskSelection { key: String, source: Error, }, NoMatchingTaskConfiguration { key: String, }, AmbiguousTaskConfiguration { key: String, }, UnknownTaskParameter { task_ordinal: u64, key: String, }, DecodeTaskParameter { task_ordinal: u64, key: String, source: Error, }, SerializeTaskParameters { task_ordinal: u64, source: Error, }, UnknownProjectPath { key: String, }, WriteConfigurationFile { path: PathBuf, source: Error, },
}
Expand description

A failure encountered while loading or using standardized project configuration.

Variants are grouped conceptually by source-file IO, source-document validation, task-space expansion, resolved task access, and exact source export. The enum is non-exhaustive so later configuration formats can add precise diagnostics without forcing downstream exhaustive matches.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ReadConfigurationFile

One of the three standard JSON files could not be read.

Fields

§path: PathBuf

Exact source path selected by the standard project layout.

§source: Error

Underlying filesystem failure.

§

ParseConfigurationFile

A readable configuration file did not contain valid JSON in its required document shape.

Duplicate object keys are detected during deserialization and reported through this variant rather than silently retaining the final value.

Fields

§path: PathBuf

Source document containing malformed or structurally invalid JSON.

§source: Error

Underlying JSON syntax or data-model failure.

§

InvalidConfigurationDocument

A syntactically valid source document violated a configuration invariant.

Examples include an empty parameter name, a Cartesian axis without candidates, inconsistent explicit-case key sets, or a non-string path value. reason is intended for diagnostics; callers that need stable programmatic distinctions should match one of the dedicated variants below where available.

Fields

§path: PathBuf

Configuration file whose semantic content was rejected.

§reason: String

Concise description of the violated invariant.

§

DuplicateConfigurationKey

One JSON object repeated an exact key.

JSON parsers often retain only the last duplicate entry. Scientific configuration rejects that ambiguity before constructing a parameter space or path table.

Fields

§path: PathBuf

Source document containing the duplicate declaration.

§key: String

Exact, unnormalized JSON key that appeared more than once.

§

FixedSweepKeyConflict

A parameter was declared as both fixed and swept.

Fixed values are never defaults or override targets. Keeping the two key sets disjoint makes every resolved lookup unambiguous.

Fields

§key: String

Exact colliding parameter name.

§fixed_path: PathBuf

Standard fixed-parameter source path.

§sweep_path: PathBuf

Standard sweep-definition source path.

§

TaskCountOverflow

Multiplying Cartesian axis lengths exceeded the supported u64 task count.

Fields

§axis: String

Axis whose candidate count caused the checked product to overflow.

§

TaskOrdinalOutOfBounds

Indexed task lookup addressed an ordinal outside the generated space.

Fields

§ordinal: u64

Requested zero-based task ordinal.

§task_count: u64

Total number of deterministic task combinations.

§

UnknownSweepParameter

Task selection named a fixed or absent key instead of a sweep key.

Fields

§key: String

Exact, case-sensitive selection key supplied by the caller.

§

EncodeTaskSelection

A caller-provided typed selector could not be represented as JSON.

Fields

§key: String

Exact sweep key whose target value was being encoded.

§source: Error

Underlying Serde JSON conversion failure.

§

NoMatchingTaskConfiguration

No generated task has the requested exact sweep value.

Fields

§key: String

Exact sweep key used for selection.

§

AmbiguousTaskConfiguration

One key/value selector matched more than one generated task.

Fields

§key: String

Exact sweep key that was insufficient to identify one task.

§

UnknownTaskParameter

A resolved task dictionary does not contain the requested exact key.

Fields

§task_ordinal: u64

Resolved task from which the parameter was requested.

§key: String

Exact, case-sensitive lookup key supplied by the caller.

§

DecodeTaskParameter

A present JSON value could not be decoded into the caller’s requested Rust type.

Fields

§task_ordinal: u64

Resolved task containing the source value.

§key: String

Exact parameter key whose value was decoded.

§source: Error

Underlying Serde JSON type or data-model failure.

§

SerializeTaskParameters

A resolved task dictionary could not be serialized as JSON.

Fields

§task_ordinal: u64

Resolved task whose logical fixed/sweep union was being serialized.

§source: Error

Underlying JSON serialization failure.

§

UnknownProjectPath

A project path lookup addressed an undeclared exact key.

Fields

§key: String

Exact, case-sensitive path name supplied by the caller.

§

WriteConfigurationFile

Exact source configuration could not be written to its destination.

Fields

§path: PathBuf

Destination file being created, written, synchronized, or renamed.

§source: Error

Underlying filesystem failure.

Trait Implementations§

Source§

impl Debug for ConfigurationError

Source§

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

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

impl Display for ConfigurationError

Source§

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

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

impl Error for ConfigurationError

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<ConfigurationError> for ScientificProjectError

Source§

fn from(source: ConfigurationError) -> Self

Converts to this type from the input type.
Source§

impl From<ConfigurationError> for RuntimeError

Source§

fn from(source: ConfigurationError) -> 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> Same for T

Source§

type Output = T

Should always be Self
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.