#[non_exhaustive]pub struct UninstallBatch {
pub mods: Vec<String>,
pub loaders: Vec<String>,
pub untracked: Vec<PathBuf>,
/* private fields */
}Expand description
What an uninstall batch will remove.
Mods and loaders are held apart because a caller showing this to a user needs to say the loader goes too, and because removing loaders last keeps every intermediate state one a user could have reached by hand. Ordinarily there is at most one loader, but the registry is keyed on package identity rather than game, so nothing rules out a second.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mods: Vec<String>Every non-loader identifier to remove, sorted.
loaders: Vec<String>Every recognised mod loader to remove, sorted, removed after mods.
untracked: Vec<PathBuf>Root-relative mod folders the record does not account for.
uninstall_batch keeps all of them unless the caller calls
UninstallBatch::confirm_untracked. With that consent it removes the
ones still listed here, so a caller shows this list and trims it to the
folders the user agreed to delete.
Implementations§
Source§impl UninstallBatch
impl UninstallBatch
Sourcepub fn confirm_untracked(&mut self)
pub fn confirm_untracked(&mut self)
Records that the user agreed to delete the folders in
UninstallBatch::untracked. Without this, uninstall_batch keeps them.
Sourcepub fn untracked_confirmed(&self) -> bool
pub fn untracked_confirmed(&self) -> bool
Whether UninstallBatch::confirm_untracked was called.