pub struct BlockerFactory;Implementations§
Source§impl BlockerFactory
impl BlockerFactory
Sourcepub fn from_schema(schema: &Schema) -> CompositeBlocker
pub fn from_schema(schema: &Schema) -> CompositeBlocker
Build a CompositeBlocker whose blocking keys are chosen automatically
from the Schema’s FieldKind annotations.
Priority rules (applied in order):
- 2+ Name fields + Date: uses
PhoneticNameDobInitialKey(surname phonetic + first-name initial + DOB year) - 1 Name field + Date: uses
PhoneticNameDobKey(surname phonetic + DOB year) - Name + Address: uses
AddressInitialKey(first address token + first name initial) - Phone: adds
SuffixKey(7)on the first Phone field - Id: adds
SuffixKey(4)on each Id field - Date only (no Name): adds
DateFragmentKey(YearMonth)on the first Date field - Categorical: adds
ExactFieldKeyon each Categorical field
Sourcepub fn from_custom_category(
schema: &Schema,
cat: CustomSchemaCategory,
) -> CompositeBlocker
pub fn from_custom_category( schema: &Schema, cat: CustomSchemaCategory, ) -> CompositeBlocker
Build a CompositeBlocker from a user-defined CustomSchemaCategory.
Each rule in the category is applied in order against schema’s
FieldKind annotations. Rules that reference field kinds not present
in the schema are silently skipped, no panic, no empty blocker.
Sourcepub fn from_schema_category(
schema: &Schema,
category: SchemaCategory,
) -> CompositeBlocker
pub fn from_schema_category( schema: &Schema, category: SchemaCategory, ) -> CompositeBlocker
Build a CompositeBlocker tuned for a specific domain category.
Keys are chosen based on both the category semantics and the
FieldKind annotations present in schema.
Auto Trait Implementations§
impl Freeze for BlockerFactory
impl RefUnwindSafe for BlockerFactory
impl Send for BlockerFactory
impl Sync for BlockerFactory
impl Unpin for BlockerFactory
impl UnsafeUnpin for BlockerFactory
impl UnwindSafe for BlockerFactory
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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