#[non_exhaustive]pub enum FieldMatchKind {
Exact,
TokenSuffix,
}Expand description
Identifies the candidate that matched a configured field rule.
§Examples
use qubit_redact::{FieldMatchKind, RedactionPolicy};
let policy = RedactionPolicy::builder()
.fields(|fields| {
fields.matching(qubit_redact::FieldNameMatching::ExactOrTokenSuffix);
fields.secret_sensitive("password");
})
.expect("the field rules should be valid")
.build()
.expect("the policy should be valid");
let classification = policy.classify_field("db_password");
assert_eq!(classification.match_kind(), Some(FieldMatchKind::TokenSuffix));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.
Exact
The complete canonical input field name matched.
TokenSuffix
A semantic token suffix of the input field name matched.
Trait Implementations§
Source§impl Clone for FieldMatchKind
impl Clone for FieldMatchKind
Source§fn clone(&self) -> FieldMatchKind
fn clone(&self) -> FieldMatchKind
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 FieldMatchKind
Source§impl Debug for FieldMatchKind
impl Debug for FieldMatchKind
impl Eq for FieldMatchKind
Source§impl Hash for FieldMatchKind
impl Hash for FieldMatchKind
Source§impl PartialEq for FieldMatchKind
impl PartialEq for FieldMatchKind
impl StructuralPartialEq for FieldMatchKind
Auto Trait Implementations§
impl Freeze for FieldMatchKind
impl RefUnwindSafe for FieldMatchKind
impl Send for FieldMatchKind
impl Sync for FieldMatchKind
impl Unpin for FieldMatchKind
impl UnsafeUnpin for FieldMatchKind
impl UnwindSafe for FieldMatchKind
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