pub trait ModScanner: Send + Sync {
// Required methods
fn scan_directories(&self) -> &[&str];
fn scan_filesystem(
&self,
ctx: &ScanContext<'_>,
) -> Result<Vec<DiscoveredMod>>;
// Provided method
fn mod_id_footprint(&self, _mod_id: &str) -> Option<ModFootprint> { ... }
}Expand description
Game-specific discovery of already-installed mods.
Each game implements this to recognise its own mod layout (directory conventions, loose files, archives) and report what it finds. This is the central scanning interface the installer and profile importer rely on.
Required Methods§
Sourcefn scan_directories(&self) -> &[&str]
fn scan_directories(&self) -> &[&str]
Install-relative directories this scanner inspects for mods.
Sourcefn scan_filesystem(&self, ctx: &ScanContext<'_>) -> Result<Vec<DiscoveredMod>>
fn scan_filesystem(&self, ctx: &ScanContext<'_>) -> Result<Vec<DiscoveredMod>>
Scan the filesystem for installed mods and return what was discovered.
Provided Methods§
Sourcefn mod_id_footprint(&self, _mod_id: &str) -> Option<ModFootprint>
fn mod_id_footprint(&self, _mod_id: &str) -> Option<ModFootprint>
Inverse of ModScanner::scan_filesystem’s mod_id scheme: given
a mod_id this scanner would produce, return the filesystem footprint
that mod owns (directory subtree or single file).
Used by modde_core::scanner::detect_stale_duplicates to correlate
profile rows with a Wabbajack manifest’s install directives. The
default impl returns None, which causes the dedup path to skip
the row. Game plugins that want their filesystem-scanner rows to
participate in dedup should override this.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".