pub struct ColumnMatcher { /* private fields */ }Expand description
Compiled column matcher for efficient pattern matching
Implementations§
Source§impl ColumnMatcher
impl ColumnMatcher
Sourcepub fn from_config(config: &RedactConfig) -> Result<Self>
pub fn from_config(config: &RedactConfig) -> Result<Self>
Create a new matcher from configuration
Sourcepub fn get_strategy(&self, table_name: &str, column_name: &str) -> StrategyKind
pub fn get_strategy(&self, table_name: &str, column_name: &str) -> StrategyKind
Get the strategy for a specific column
Sourcepub fn get_strategies(
&self,
table_name: &str,
table: &TableSchema,
) -> Vec<StrategyKind>
pub fn get_strategies( &self, table_name: &str, table: &TableSchema, ) -> Vec<StrategyKind>
Get strategies for all columns in a table
Sourcepub fn count_matches(&self, table_name: &str, table: &TableSchema) -> usize
pub fn count_matches(&self, table_name: &str, table: &TableSchema) -> usize
Count how many columns match any redaction rule
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColumnMatcher
impl RefUnwindSafe for ColumnMatcher
impl Send for ColumnMatcher
impl Sync for ColumnMatcher
impl Unpin for ColumnMatcher
impl UnwindSafe for ColumnMatcher
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more