pub struct InstallProbe {
pub analyze: Box<dyn Fn(&Path) -> Option<InstallMethod> + Send + Sync>,
pub recognizes_bare: Box<dyn Fn(&Path) -> bool + Send + Sync>,
pub user_config_target: Option<&'static str>,
}Expand description
Callbacks the analyzer uses to delegate to a game plugin.
Both hooks have sensible defaults (InstallProbe::noop), so a game
plugin with no special layouts can just leave them unimplemented.
Fields§
§analyze: Box<dyn Fn(&Path) -> Option<InstallMethod> + Send + Sync>Return a game-specific InstallMethod if the plugin recognizes
the extracted archive authoritatively (e.g. Cyberpunk identifying
a REDmod by info.json + archives/ presence). Runs before
the generic probes so it can claim layouts that also happen to
trigger generic heuristics.
recognizes_bare: Box<dyn Fn(&Path) -> bool + Send + Sync>Return true if the extracted archive looks like a bare-extract
for this game (e.g. top-level Data/ for Bethesda). Runs as the
last fallback before InstallMethod::Unknown.
user_config_target: Option<&'static str>Plugin-supplied id of a DeployTargetKind::UserConfig root, if
this game advertises one. The analyzer falls back to a
InstallMethod::UserConfigOverlay keyed on this id when the
archive contains only config-shaped files. None means the
game has no user-config target — config-only archives will go
straight to Unknown.
Implementations§
Source§impl InstallProbe
impl InstallProbe
Sourcepub fn with_user_config_target(self, target_id: &'static str) -> Self
pub fn with_user_config_target(self, target_id: &'static str) -> Self
Builder: attach a user-config target id. The analyzer will
route config-only archives to UserConfigOverlay { target_id }.