unlock: add Unlocker::name() + report-only applies_to() for the matrix

Each unlocker now carries its own stable name() (the single source; apps
never hardcode it) and a report-only applies_to() — phase-independent
'would this apply to this drive+disc', distinct from the dispatch-gated
matches(). LibreDrive overrides applies_to to report on drive identity
regardless of disc kind (its matches() is gated to the Unknown-kind init
phase). Enables a registry-driven unlocker matrix.
This commit is contained in:
Matthew Jackson
2026-07-01 10:00:59 -07:00
parent 852cee1ea0
commit 569e23662b
5 changed files with 40 additions and 5 deletions
+4
View File
@@ -160,6 +160,10 @@ impl Default for CssUnlocker {
}
impl crate::Unlocker for CssUnlocker {
fn name(&self) -> &'static str {
"CSS"
}
fn matches(&self, ctx: &crate::UnlockCtx) -> bool {
ctx.kind == crate::DiscKind::Css
}