readd removed utility, cleanup/shorten enum usage

This commit is contained in:
M.Schmidt
2026-07-13 22:22:12 +02:00
parent 6701ddfc17
commit c62f97d8f2
3 changed files with 11 additions and 6 deletions
+6
View File
@@ -138,6 +138,12 @@ impl Drive {
pub fn typed_policies(&self) -> DrivePolicies {
DrivePolicies::from_value(&self.policies)
}
/// `true` if this drive is a personal drive of any kind (default or
/// secondary). Encapsulates the kind check at the call site.
pub fn is_personal(&self) -> bool {
matches!(self.kind, DriveKind::Personal)
}
}
/// Typed mirror of the `policies` JSONB. Five known keys; the JSONB column