#[non_exhaustive]pub enum SpecError {
Downstream {
message: String,
source: Option<Box<dyn Error + Send + Sync + 'static>>,
},
Config(String),
}Expand description
Errors raised by klieo-spec traits and the loop runner.
Marked #[non_exhaustive] so additional variants can be introduced
without a major-version bump on impl crates that match on the enum.
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.
Downstream
A downstream Decomposer/Critic/Refiner impl failed.
Carries a context message plus the impl’s original error as
#[source] so e.source() traversal preserves the cause chain.
Covers any downstream trait-impl failure that does not fit the
typed variants.
Fields
Config(String)
A misconfiguration in the loop (e.g. zero max iterations).
Trait Implementations§
Source§impl Error for SpecError
impl Error for SpecError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for SpecError
impl !UnwindSafe for SpecError
impl Freeze for SpecError
impl Send for SpecError
impl Sync for SpecError
impl Unpin for SpecError
impl UnsafeUnpin for SpecError
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
Mutably borrows from an owned value. Read more