implements the batch details

This commit is contained in:
Tamo 2024-11-19 17:06:00 +01:00
parent 5d10c2312b
commit 229fa0f902
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
110 changed files with 493 additions and 275 deletions

View file

@ -96,6 +96,14 @@ impl<T> Setting<T> {
}
}
/// Returns other if self is not set.
pub fn or(self, other: Self) -> Self {
match self {
Setting::Set(_) | Setting::Reset => self,
Setting::NotSet => other,
}
}
/// Returns `true` if applying the new setting changed this setting
pub fn apply(&mut self, new: Self) -> bool
where