pub enum NotRemovable {
RecordAbsent {
name: String,
path: PathBuf,
},
RecordUnreadable {
name: String,
path: PathBuf,
source: Error,
},
}Expand description
Why a recorded mod’s files cannot be removed exactly.
Returned rather than flattened into a message because the distinction drives what a caller should advise: an absent record can be rebuilt by reinstalling, while an unreadable one is a file the engine will not guess the contents of. Only the wording of that advice belongs to the caller, and a caller that words it itself should not have to re-derive the reason by re-reading the record the engine has already read.
Deliberately not #[non_exhaustive], unlike the rest of this crate’s
public types, for the same reason launch::LaunchPlan::to_command gives: a
caller that words each refusal should stop compiling when a new reason
appears, rather than silently printing a generic fallback for a case nobody
worded. Designing that fallback is the thing this type exists to avoid.
Variants§
RecordAbsent
A recognised mod loader with no install record at path, so which files it
placed is unknown. Reinstalling the loader rebuilds the record.
RecordUnreadable
An install record exists at path but could not be read or parsed, so the
engine does not know which files it tracked and will not guess.