#[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
SerializeStudyRecord
A completed study record could not be encoded as JSON.
WriteStudyRecord
A serialized study record could not be written durably.
StudyRecordTimestamp
A UTC timestamp required by a study record could not be formatted.
Fields
SerializeStudyPlan
A study plan could not be encoded as JSON.
WriteStudyPlan
A serialized study plan could not be written durably.
StudyPlanConflict
A plan destination already contains a different immutable declaration.
PhaseExecutionFailed
A phase failed after producing a durable partial study summary.
Fields
summary: StudySummarySummary 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.
EmptyPhaseSet
A study was declared without phases.
InvalidPhaseLabel
A phase label is empty or whitespace-only.
InvalidPhaseWorkloadLimit
A phase declares a zero active-task limit.
InvalidPhaseQueueCapacity
A phase declares a zero prepared-task queue capacity.
InvalidPhaseTiming
A phase timing setting is zero or cannot be represented internally.
DuplicatePhaseId
Two phases have the same stable identity.
UnknownPhaseDependency
A phase depends on an undeclared phase.
PhaseDependencyCycle
The declared phase dependency graph is cyclic.
UnknownSelectedPhase
Execution selected a phase that is not declared.
UnsatisfiedPhaseDependency
Execution omitted a required dependency of a selected phase.
PhaseConfirmationEof
Interactive confirmation input ended before another phase could start.
PhaseConfirmationInput
Interactive confirmation input could not be read.
MissingTaskWorkload
An executable task declaration has no workload.
TaskWorkload
An application-owned task workload returned an error.
Fields
TaskTimedOut
A task did not stop cooperatively before its timeout.
PhaseDeadlineExceeded
A phase did not stop cooperatively before its deadline.
Fields
SchedulerPanicked
A scheduler worker thread panicked.
Cancelled
Study execution was cancelled cooperatively.
InvalidTaskId
A task ID is empty or whitespace-only.
InvalidTaskCategory
A task category is empty or whitespace-only.
DuplicateTaskId
A phase repeats a task ID.
TaskNotFound
A task selector matched no declared task.
TaskSelectorAmbiguous
An unqualified selector matched more than one task.
Fields
UnknownTaskMetadata
A task does not contain requested metadata.
DecodeTaskMetadata
Task metadata could not be decoded as the requested type.
Fields
UnknownTask
A progress operation referenced an unregistered task.
TaskModeMismatch
A progress operation is incompatible with the task’s declared mode.
Fields
TaskAlreadyStarted
A task was started after already leaving its pending state.
InitialIterationBeyondTarget
Initial progress is greater than the declared target iteration.
Fields
IterationRegressed
A task attempted to report a lower iteration than previously observed.
Fields
IterationBeyondTarget
A task reported progress beyond its target iteration.
Fields
TargetIterationNotReached
A task reported completion before reaching its target iteration.
Fields
StartRenderer
The renderer thread could not be created.
TerminalSetup
The process terminal could not be prepared or restored.
Fields
The renderer stopped accepting progress commands unexpectedly.
RendererPanicked
The renderer thread panicked.
IncompleteProgress
A success summary was requested while non-success task states remain.
Implementations§
Source§impl StudyError
impl StudyError
Sourcepub fn study_summary(&self) -> Option<&StudySummary>
pub fn study_summary(&self) -> Option<&StudySummary>
Returns the durable partial summary attached to a phase execution failure.
Sourcepub fn execution_cause(&self) -> Option<&StudyError>
pub fn execution_cause(&self) -> Option<&StudyError>
Returns the original cause attached to a phase execution failure.
Trait Implementations§
Source§impl Debug for StudyError
impl Debug for StudyError
Source§impl Display for StudyError
impl Display for StudyError
Source§impl Error for StudyError
impl Error for StudyError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for StudyError
impl !UnwindSafe for StudyError
impl Freeze for StudyError
impl Send for StudyError
impl Sync for StudyError
impl Unpin for StudyError
impl UnsafeUnpin for StudyError
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more