#[non_exhaustive]pub enum SensitiveFieldPreset {
Credentials,
CredentialContainers,
AuthTokens,
Http,
Session,
}Expand description
Predefined groups of sensitive field names.
§Examples
use qubit_redact::SensitiveFieldPreset;
assert!(SensitiveFieldPreset::Credentials
.fields()
.iter()
.any(|(field, _)| *field == "password"));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Credentials
Passwords, client secrets, private keys, and secret-like names.
CredentialContainers
Connection strings and configuration values that embed credentials.
AuthTokens
API keys, access tokens, refresh tokens, and JWT-like names.
Http
HTTP authentication and cookie fields.
Session
Session identifiers and session tokens.
Implementations§
Source§impl SensitiveFieldPreset
impl SensitiveFieldPreset
Sourcepub const fn fields(self) -> &'static [(&'static str, Sensitivity)]
pub const fn fields(self) -> &'static [(&'static str, Sensitivity)]
Returns the built-in field-name and sensitivity pairs in this preset.
§Returns
The complete built-in field table for this preset.
Trait Implementations§
Source§impl Clone for SensitiveFieldPreset
impl Clone for SensitiveFieldPreset
Source§fn clone(&self) -> SensitiveFieldPreset
fn clone(&self) -> SensitiveFieldPreset
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SensitiveFieldPreset
Source§impl Debug for SensitiveFieldPreset
impl Debug for SensitiveFieldPreset
impl Eq for SensitiveFieldPreset
Source§impl Hash for SensitiveFieldPreset
impl Hash for SensitiveFieldPreset
Source§impl PartialEq for SensitiveFieldPreset
impl PartialEq for SensitiveFieldPreset
impl StructuralPartialEq for SensitiveFieldPreset
Auto Trait Implementations§
impl Freeze for SensitiveFieldPreset
impl RefUnwindSafe for SensitiveFieldPreset
impl Send for SensitiveFieldPreset
impl Sync for SensitiveFieldPreset
impl Unpin for SensitiveFieldPreset
impl UnsafeUnpin for SensitiveFieldPreset
impl UnwindSafe for SensitiveFieldPreset
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