#[non_exhaustive]pub enum FieldNameMatching {
Exact,
ExactOrTokenSuffix,
}Expand description
Controls which canonical field-name candidates may match policy rules.
§Examples
use qubit_redact::{FieldNameMatching, RedactionPolicy};
let policy = RedactionPolicy::builder()
.fields(|fields| {
fields.matching(FieldNameMatching::ExactOrTokenSuffix);
})
.expect("the field rules should be valid")
.build()
.expect("the policy should be valid");
assert_eq!(policy.matching(), FieldNameMatching::ExactOrTokenSuffix);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
Matches only the complete canonical field name.
ExactOrTokenSuffix
Matches the complete name and semantic token suffixes.
Trait Implementations§
Source§impl Clone for FieldNameMatching
impl Clone for FieldNameMatching
Source§fn clone(&self) -> FieldNameMatching
fn clone(&self) -> FieldNameMatching
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 FieldNameMatching
Source§impl Debug for FieldNameMatching
impl Debug for FieldNameMatching
impl Eq for FieldNameMatching
Source§impl Hash for FieldNameMatching
impl Hash for FieldNameMatching
Source§impl PartialEq for FieldNameMatching
impl PartialEq for FieldNameMatching
impl StructuralPartialEq for FieldNameMatching
Auto Trait Implementations§
impl Freeze for FieldNameMatching
impl RefUnwindSafe for FieldNameMatching
impl Send for FieldNameMatching
impl Sync for FieldNameMatching
impl Unpin for FieldNameMatching
impl UnsafeUnpin for FieldNameMatching
impl UnwindSafe for FieldNameMatching
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