Skip to main content

Module error

Module error 

Expand description

The crate-wide error type.

atune never panics on library paths: every fallible operation returns Result, and every failure mode that a caller might reasonably want to distinguish gets its own variant rather than being flattened into a string.

Two variants carry special meaning:

  • Error::TrialPruned is a sentinel, not a failure. It is what TrialCtx::should_stop returns so that objective code can bail out with ? when a scheduler decides the trial is not worth continuing. A trial that ends this way is recorded as TrialState::Pruned, not as a failure.
  • Error::LostRace is the typed form of “somebody else got there first”. Storage backends report a lost state transition as Ok(false) from Storage::try_transition; this variant exists for the paths where the loss is not expressible as a boolean.

Enums§

Error
Everything that can go wrong inside atune.

Type Aliases§

Result
The crate-wide result alias.