pub struct InstallProbe {
pub analyze: Box<dyn Fn(&Path) -> Option<InstallMethod> + Send + Sync>,
pub recognizes_bare: Box<dyn Fn(&Path) -> bool + Send + Sync>,
}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.
Implementations§
Source§impl InstallProbe
impl InstallProbe
Auto Trait Implementations§
impl Freeze for InstallProbe
impl !RefUnwindSafe for InstallProbe
impl Send for InstallProbe
impl Sync for InstallProbe
impl Unpin for InstallProbe
impl UnsafeUnpin for InstallProbe
impl !UnwindSafe for InstallProbe
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more