#[non_exhaustive]pub enum GeneratorError {
FileRead {
path: String,
source: Error,
},
}Expand description
Errors originating from value or log generators.
Currently contains FileRead for I/O failures
when loading generator data from disk. This enum is designed for
extensibility — future variants may include InvalidData (malformed file
contents), ParseFailed (unparseable numeric columns), or
UnsupportedFormat as generator capabilities grow.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FileRead
Failed to read a generator input file (CSV replay, log replay).
Preserves the original std::io::Error via the #[source] attribute
so callers can inspect the error kind (e.g., ErrorKind::NotFound vs
ErrorKind::PermissionDenied) programmatically.
Implementations§
Source§impl GeneratorError
impl GeneratorError
Sourcepub fn source_io_kind(&self) -> Option<ErrorKind>
pub fn source_io_kind(&self) -> Option<ErrorKind>
Returns the std::io::ErrorKind of the underlying I/O error, if this
is a FileRead variant.
Convenience method that lets callers inspect the error kind without
manually traversing the source() chain.
Trait Implementations§
Source§impl Debug for GeneratorError
impl Debug for GeneratorError
Source§impl Display for GeneratorError
impl Display for GeneratorError
Source§impl Error for GeneratorError
impl Error for GeneratorError
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()