#[non_exhaustive]pub enum SecretKind {
AwsAccessKeyId,
GithubToken,
GitlabToken,
SlackToken,
PrivateKey,
Jwt,
HighEntropy,
Custom(String),
}Expand description
The kind of secret a detector found. Display yields the stable slug
used inside the replacement token and in hh scan output.
#[non_exhaustive]: new named detectors are the roadmap (more token
types over time); this keeps that additive under semver-checks. Variant
construction from other crates is unaffected — only exhaustive match
requires a wildcard arm, which nothing outside this crate currently does.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AwsAccessKeyId
AWS access key id (AKIA…/ASIA… and friends).
GithubToken
GitHub token (ghp_/gho_/ghu_/ghs_/ghr_/github_pat_).
GitlabToken
GitLab token (glpat-/glrt-/gldt-/glsoat-/glcbt-).
SlackToken
Slack token (xoxb-/xoxa-/xoxp-/xoxr-/xoxs-/xoxe-).
PrivateKey
A PEM private-key block (-----BEGIN … PRIVATE KEY-----).
Jwt
A JSON Web Token (three base64url segments, eyJ…-headed).
HighEntropy
A generic high-entropy string above the conservative threshold.
Custom(String)
A user-defined rule from config [redaction] rules; reports as
custom:<name>.
Trait Implementations§
Source§impl Clone for SecretKind
impl Clone for SecretKind
Source§fn clone(&self) -> SecretKind
fn clone(&self) -> SecretKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecretKind
impl Debug for SecretKind
Source§impl Display for SecretKind
impl Display for SecretKind
impl Eq for SecretKind
Source§impl Hash for SecretKind
impl Hash for SecretKind
Source§impl Ord for SecretKind
impl Ord for SecretKind
Source§fn cmp(&self, other: &SecretKind) -> Ordering
fn cmp(&self, other: &SecretKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SecretKind
impl PartialEq for SecretKind
Source§impl PartialOrd for SecretKind
impl PartialOrd for SecretKind
impl StructuralPartialEq for SecretKind
Auto Trait Implementations§
impl Freeze for SecretKind
impl RefUnwindSafe for SecretKind
impl Send for SecretKind
impl Sync for SecretKind
impl Unpin for SecretKind
impl UnsafeUnpin for SecretKind
impl UnwindSafe for SecretKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.