#[non_exhaustive]pub enum BenchReadError {
Open {
path: PathBuf,
source: Error,
},
Read {
path: PathBuf,
source: Error,
},
Json {
path: PathBuf,
line: usize,
source: Error,
},
MalformedRecord {
path: PathBuf,
line: usize,
record_type: String,
source: Error,
},
DuplicateRunStart(PathBuf),
DuplicateRunEnd(PathBuf),
InvalidInput(PathBuf),
}Expand description
Failure while reading a benchmark artifact.
§Examples
use ailloli_ui_bench::BenchReadError;
let error = BenchReadError::InvalidInput("missing".into());
assert!(error.to_string().contains("neither a JSONL file nor a directory"));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.
Open
Opening a JSONL artifact failed.
Fields
Read
Reading an already opened artifact failed.
Json
One physical line was not valid JSON.
Fields
MalformedRecord
A recognized record type had an invalid typed payload.
Fields
DuplicateRunStart(PathBuf)
More than one run_start line appeared in the artifact.
DuplicateRunEnd(PathBuf)
More than one run_end line appeared in the artifact.
InvalidInput(PathBuf)
Collection input was neither a regular file nor a directory.
Trait Implementations§
Source§impl Debug for BenchReadError
impl Debug for BenchReadError
Source§impl Display for BenchReadError
impl Display for BenchReadError
Source§impl Error for BenchReadError
impl Error for BenchReadError
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 BenchReadError
impl !RefUnwindSafe for BenchReadError
impl Send for BenchReadError
impl Sync for BenchReadError
impl Unpin for BenchReadError
impl !UnwindSafe for BenchReadError
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