pub enum CaseError {
Unknown(String),
Io(PathBuf, Error),
Parse(PathBuf, Error),
NameMismatch {
path: PathBuf,
expected: String,
found: String,
},
}Expand description
Errors the case loader can produce.
The variants are designed to support a meaningful exit-code mapping
in any binary that uses this crate. The llm-assisted-api-debugging-lab binary in
this repo follows the convention:
Unknown→ exit code 2 (caller passed a bad name).Io,Parse,NameMismatch→ exit code 3 (a fixture file is broken).
The distinction matters for set -e-style shell integration where
the caller wants to react differently to “you misspelled the
argument” vs “the on-disk fixture is corrupt.” Library consumers can
adopt the same convention or pick their own.
Variants§
Trait Implementations§
Source§impl Error for CaseError
impl Error for CaseError
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 Freeze for CaseError
impl !RefUnwindSafe for CaseError
impl Send for CaseError
impl Sync for CaseError
impl Unpin for CaseError
impl UnsafeUnpin for CaseError
impl !UnwindSafe for CaseError
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