pub struct IsoParser<E: IsoEnvironment> { /* private fields */ }Expand description
ISO Parser - main entry point for boot discovery
Generic over environment to allow testing without actual filesystem/mounts.
Implementations§
Source§impl<E: IsoEnvironment> IsoParser<E>
impl<E: IsoEnvironment> IsoParser<E>
Sourcepub fn new(env: E) -> Self
pub fn new(env: E) -> Self
Construct a parser bound to the given IsoEnvironment.
Typically OsIsoEnvironment in production; a mock in tests.
Sourcepub async fn scan_directory(
&self,
path: &Path,
) -> Result<Vec<BootEntry>, IsoError>
pub async fn scan_directory( &self, path: &Path, ) -> Result<Vec<BootEntry>, IsoError>
Scan a directory for ISO files and extract boot entries
Scan a directory for .iso files, mount + parse each one, and
return the collected BootEntry records.
The async signature is retained for backwards source-compat
with callers that .await it; the function itself performs no
async work today.
§Errors
Returns IsoError::PathTraversal if path escapes
/ (degenerate), or IsoError::Io on a filesystem read
failure during the ISO-file discovery walk. Per-ISO parse /
mount failures are silently skipped and logged at debug; the
overall scan succeeds as long as at least the walk works.