pub struct Builtin {
pub id: &'static str,
pub display_name: &'static str,
pub severity: Severity,
pub regex_src: &'static str,
pub regex: OnceLock<Regex>,
pub metadata: Option<PatternMetadata>,
pub rotation: Option<RotationSpec>,
pub liveness: Option<LivenessSpec>,
}Expand description
Adapter struct that turns a static data row into a
SecretPattern implementation. Each BUILTINS entry is a
Builtin; the regex compiles lazily on first access via
OnceLock so process startup pays nothing for patterns that are
never consulted.
Fields§
§id: &'static strStable identifier (lowercase kebab-case).
display_name: &'static strHuman-readable name.
severity: SeveritySeverity to attach to a leak finding.
regex_src: &'static strRegex source — compiled lazily into Builtin::regex.
regex: OnceLock<Regex>Lazily-compiled regex. Use Builtin::compiled_regex in
preference to touching this field directly.
metadata: Option<PatternMetadata>Optional descriptive metadata (provider id, retrieval URL, expiry default, scope hints).
rotation: Option<RotationSpec>Optional rotation hint. None for v1; populated when P2.4 wires inheritance.
liveness: Option<LivenessSpec>Optional liveness probe. None for v1; populated when P9.2 adds provider liveness checks.
Trait Implementations§
Source§impl SecretPattern for Builtin
impl SecretPattern for Builtin
Source§fn id(&self) -> &str
fn id(&self) -> &str
Stable identifier (lowercase, kebab-case). Used as a foreign
key from the global index entry’s
pattern_id (ADR-020 §3)
and as a join key with other tools that consume the
catalogue.Source§fn display_name(&self) -> &str
fn display_name(&self) -> &str
Human-readable name shown in
secrets describe and in
scan-tool reports.Source§fn format_regex(&self) -> &Regex
fn format_regex(&self) -> &Regex
Regular expression matching valid values of this kind. Read more
Source§fn metadata(&self) -> Option<&PatternMetadata>
fn metadata(&self) -> Option<&PatternMetadata>
Optional descriptive metadata (provider, retrieval URL,
expiry, scopes). Read more
Auto Trait Implementations§
impl !Freeze for Builtin
impl RefUnwindSafe for Builtin
impl Send for Builtin
impl Sync for Builtin
impl Unpin for Builtin
impl UnsafeUnpin for Builtin
impl UnwindSafe for Builtin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more