pub trait DatasetLoader {
// Required methods
fn name(&self) -> &'static str;
fn load(&self, path: &Path) -> Result<Vec<Scenario>, BenchError>;
}Expand description
Loads scenarios from a dataset file on disk.
Implement this trait to add support for a new dataset format. The harness
calls DatasetLoader::load once per run to materialise the full scenario
list before iterating.
Built-in implementations:
crate::loaders::LocomoLoader— JSON array of sessionscrate::loaders::FramesLoader— JSONL, one record per linecrate::loaders::GaiaLoader— JSONL with optional level filter
Required Methods§
Sourcefn name(&self) -> &'static str
fn name(&self) -> &'static str
Short identifier matching the dataset name in crate::DatasetRegistry.
Sourcefn load(&self, path: &Path) -> Result<Vec<Scenario>, BenchError>
fn load(&self, path: &Path) -> Result<Vec<Scenario>, BenchError>
Load all matching scenarios from path.
§Errors
Returns BenchError::Io when the file cannot be opened or read, and
BenchError::InvalidFormat when the file content cannot be parsed.