From 6ace16293b28aedb380924e3cb4c62584f39f655 Mon Sep 17 00:00:00 2001 From: Matthew Jackson <1085847+MattJackson@users.noreply.github.com> Date: Tue, 23 Jun 2026 09:09:06 -0700 Subject: [PATCH] keysource: add KeySource::label() for source identification --- src/keysource.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/keysource.rs b/src/keysource.rs index cf119ac..2d6dda9 100644 --- a/src/keysource.rs +++ b/src/keysource.rs @@ -85,6 +85,14 @@ pub trait KeySource { false } + /// A short, stable identifier for this source kind (`"keydb"`, `"online"`, + /// `"mapfile"`, …). For logging which source produced a key, and for + /// composition/ordering logic that needs to tell sources apart. A format + /// string, not user-facing English. + fn label(&self) -> &'static str { + "source" + } + /// Whether this source FAILED (I/O, network, parse) rather than simply /// having no key. Checked after exhaustion so the caller can tell a genuine /// "no key for this disc" apart from "the key service was unreachable". A