Skip to main content

StudyError

Enum StudyError 

Source
#[non_exhaustive]
pub enum StudyError {
Show 46 variants SerializeStudyRecord { source: Error, }, WriteStudyRecord { path: PathBuf, source: Error, }, StudyRecordTimestamp { operation: &'static str, source: Format, }, SerializeStudyPlan { source: Error, }, WriteStudyPlan { path: PathBuf, source: Error, }, StudyPlanConflict { path: PathBuf, }, PhaseExecutionFailed { summary: StudySummary, source: Box<StudyError>, }, TerminalAlreadyOwned, EmptyPhase { phase: u64, }, EmptyPhaseSet, InvalidPhaseLabel { phase: u64, }, InvalidPhaseWorkloadLimit { phase: u64, }, InvalidPhaseQueueCapacity { phase: u64, }, InvalidPhaseTiming { phase: u64, setting: &'static str, }, DuplicatePhaseId { phase: u64, }, UnknownPhaseDependency { phase: u64, dependency: u64, }, PhaseDependencyCycle { phase: u64, }, UnknownSelectedPhase { phase: u64, }, UnsatisfiedPhaseDependency { phase: u64, dependency: u64, }, PhaseConfirmationEof { phase: u64, }, PhaseConfirmationInput { phase: u64, source: Error, }, MissingTaskWorkload { task: String, }, TaskWorkload { task: String, source: Box<dyn Error + Send + Sync + 'static>, }, TaskTimedOut { task: String, timeout: Duration, }, PhaseDeadlineExceeded { phase: u64, deadline_after: Duration, }, SchedulerPanicked, Cancelled, InvalidTaskId { phase: u64, }, InvalidTaskCategory { task: String, }, DuplicateTaskId { phase: u64, task: String, }, TaskNotFound { selector: String, }, TaskSelectorAmbiguous { selector: String, first: String, second: String, }, UnknownTaskMetadata { task: String, key: String, }, DecodeTaskMetadata { task: String, key: String, source: Error, }, UnknownTask { task: String, }, TaskModeMismatch { task: String, requested: &'static str, actual: &'static str, }, TaskAlreadyStarted { identity: String, }, InitialIterationBeyondTarget { identity: String, initial: u64, target: u64, }, IterationRegressed { identity: String, current: u64, attempted: u64, }, IterationBeyondTarget { identity: String, iteration: u64, target: u64, }, TargetIterationNotReached { identity: String, current: u64, target: u64, }, StartRenderer { source: Error, }, TerminalSetup { operation: &'static str, source: Error, }, RendererUnavailable, RendererPanicked, IncompleteProgress { pending: u64, running: u64, failed: u64, },
}
Expand description

Failure while validating, executing, recording, or displaying a study.

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

SerializeStudyRecord

A completed study record could not be encoded as JSON.

Fields

§source: Error

Underlying Serde serialization failure.

§

WriteStudyRecord

A serialized study record could not be written durably.

Fields

§path: PathBuf

Destination study-record path.

§source: Error

Underlying filesystem failure.

§

StudyRecordTimestamp

A UTC timestamp required by a study record could not be formatted.

Fields

§operation: &'static str

Record operation that requested the timestamp.

§source: Format

Underlying time-formatting failure.

§

SerializeStudyPlan

A study plan could not be encoded as JSON.

Fields

§source: Error

Underlying Serde serialization failure.

§

WriteStudyPlan

A serialized study plan could not be written durably.

Fields

§path: PathBuf

Destination study-plan path.

§source: Error

Underlying filesystem failure.

§

StudyPlanConflict

A plan destination already contains a different immutable declaration.

Fields

§path: PathBuf

Path containing the conflicting plan.

§

PhaseExecutionFailed

A phase failed after producing a durable partial study summary.

Fields

§summary: StudySummary

Summary and record containing all completed phase outcomes.

§source: Box<StudyError>

Original phase execution failure.

§

TerminalAlreadyOwned

Another study currently owns the process-wide terminal renderer.

§

EmptyPhase

A phase was declared without tasks.

Fields

§phase: u64

Invalid phase identity.

§

EmptyPhaseSet

A study was declared without phases.

§

InvalidPhaseLabel

A phase label is empty or whitespace-only.

Fields

§phase: u64

Invalid phase identity.

§

InvalidPhaseWorkloadLimit

A phase declares a zero active-task limit.

Fields

§phase: u64

Invalid phase identity.

§

InvalidPhaseQueueCapacity

A phase declares a zero prepared-task queue capacity.

Fields

§phase: u64

Invalid phase identity.

§

InvalidPhaseTiming

A phase timing setting is zero or cannot be represented internally.

Fields

§phase: u64

Invalid phase identity.

§setting: &'static str

Name of the rejected timing setting.

§

DuplicatePhaseId

Two phases have the same stable identity.

Fields

§phase: u64

Repeated phase identity.

§

UnknownPhaseDependency

A phase depends on an undeclared phase.

Fields

§phase: u64

Depending phase identity.

§dependency: u64

Missing dependency identity.

§

PhaseDependencyCycle

The declared phase dependency graph is cyclic.

Fields

§phase: u64

One phase involved in the cycle.

§

UnknownSelectedPhase

Execution selected a phase that is not declared.

Fields

§phase: u64

Missing selected phase identity.

§

UnsatisfiedPhaseDependency

Execution omitted a required dependency of a selected phase.

Fields

§phase: u64

Selected phase identity.

§dependency: u64

Omitted dependency identity.

§

PhaseConfirmationEof

Interactive confirmation input ended before another phase could start.

Fields

§phase: u64

Last completed phase identity.

§

PhaseConfirmationInput

Interactive confirmation input could not be read.

Fields

§phase: u64

Last completed phase identity.

§source: Error

Underlying input failure.

§

MissingTaskWorkload

An executable task declaration has no workload.

Fields

§task: String

Phase-qualified task identity.

§

TaskWorkload

An application-owned task workload returned an error.

Fields

§task: String

Phase-qualified task identity.

§source: Box<dyn Error + Send + Sync + 'static>

Application-owned workload failure.

§

TaskTimedOut

A task did not stop cooperatively before its timeout.

Fields

§task: String

Phase-qualified task identity.

§timeout: Duration

Configured task timeout.

§

PhaseDeadlineExceeded

A phase did not stop cooperatively before its deadline.

Fields

§phase: u64

Expired phase identity.

§deadline_after: Duration

Configured phase deadline relative to its start.

§

SchedulerPanicked

A scheduler worker thread panicked.

§

Cancelled

Study execution was cancelled cooperatively.

§

InvalidTaskId

A task ID is empty or whitespace-only.

Fields

§phase: u64

Phase containing the invalid task.

§

InvalidTaskCategory

A task category is empty or whitespace-only.

Fields

§task: String

Phase-qualified invalid task identity.

§

DuplicateTaskId

A phase repeats a task ID.

Fields

§phase: u64

Phase containing the duplicate.

§task: String

Repeated phase-local task ID.

§

TaskNotFound

A task selector matched no declared task.

Fields

§selector: String

Unmatched selector text.

§

TaskSelectorAmbiguous

An unqualified selector matched more than one task.

Fields

§selector: String

Ambiguous selector text.

§first: String

First matching phase-qualified task identity.

§second: String

Second matching phase-qualified task identity.

§

UnknownTaskMetadata

A task does not contain requested metadata.

Fields

§task: String

Phase-qualified task identity.

§key: String

Missing metadata key.

§

DecodeTaskMetadata

Task metadata could not be decoded as the requested type.

Fields

§task: String

Phase-qualified task identity.

§key: String

Metadata key being decoded.

§source: Error

Underlying Serde conversion failure.

§

UnknownTask

A progress operation referenced an unregistered task.

Fields

§task: String

Unregistered phase-qualified task identity.

§

TaskModeMismatch

A progress operation is incompatible with the task’s declared mode.

Fields

§task: String

Phase-qualified task identity.

§requested: &'static str

Mode required by the attempted operation.

§actual: &'static str

Mode declared by the task.

§

TaskAlreadyStarted

A task was started after already leaving its pending state.

Fields

§identity: String

Phase-qualified task identity.

§

InitialIterationBeyondTarget

Initial progress is greater than the declared target iteration.

Fields

§identity: String

Phase-qualified task identity.

§initial: u64

Rejected initial iteration.

§target: u64

Declared target iteration.

§

IterationRegressed

A task attempted to report a lower iteration than previously observed.

Fields

§identity: String

Phase-qualified task identity.

§current: u64

Last accepted iteration.

§attempted: u64

Rejected lower iteration.

§

IterationBeyondTarget

A task reported progress beyond its target iteration.

Fields

§identity: String

Phase-qualified task identity.

§iteration: u64

Rejected reported iteration.

§target: u64

Declared target iteration.

§

TargetIterationNotReached

A task reported completion before reaching its target iteration.

Fields

§identity: String

Phase-qualified task identity.

§current: u64

Last accepted iteration.

§target: u64

Declared target iteration.

§

StartRenderer

The renderer thread could not be created.

Fields

§source: Error

Underlying thread-creation failure.

§

TerminalSetup

The process terminal could not be prepared or restored.

Fields

§operation: &'static str

Stable terminal operation description.

§source: Error

Underlying terminal IO failure.

§

RendererUnavailable

The renderer stopped accepting progress commands unexpectedly.

§

RendererPanicked

The renderer thread panicked.

§

IncompleteProgress

A success summary was requested while non-success task states remain.

Fields

§pending: u64

Number of tasks that never started.

§running: u64

Number of tasks still running.

§failed: u64

Number of failed tasks.

Implementations§

Source§

impl StudyError

Source

pub fn study_summary(&self) -> Option<&StudySummary>

Returns the durable partial summary attached to a phase execution failure.

Source

pub fn execution_cause(&self) -> Option<&StudyError>

Returns the original cause attached to a phase execution failure.

Trait Implementations§

Source§

impl Debug for StudyError

Source§

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

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

impl Display for StudyError

Source§

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

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

impl Error for StudyError

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

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToLine for T
where T: Display,

Source§

fn to_line(&self) -> Line<'_>

Converts the value to a Line.
Source§

impl<T> ToSpan for T
where T: Display,

Source§

fn to_span(&self) -> Span<'_>

Converts the value to a Span.
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> ToText for T
where T: Display,

Source§

fn to_text(&self) -> Text<'_>

Converts the value to a Text.
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.