pub struct CompositeBlocker { /* private fields */ }Expand description
Composite blocker that applies multiple blocking keys.
For cross-schema linkage, source_remaps stores per-source field-name
translations (b_field to a_field). Before key extraction, any record
whose source label has an entry in source_remaps gets its fields
renamed to the canonical (A-side) names so the existing BlockingKey
implementations can extract values without knowing about schema differences.
Implementations§
Source§impl CompositeBlocker
impl CompositeBlocker
pub fn new() -> CompositeBlocker
pub fn add(self, key: impl BlockingKey + 'static) -> CompositeBlocker
pub fn add_boxed(self, key: Box<dyn BlockingKey>) -> CompositeBlocker
Sourcepub fn with_source_remap(
self,
source: impl Into<String>,
remap: HashMap<String, String>,
) -> CompositeBlocker
pub fn with_source_remap( self, source: impl Into<String>, remap: HashMap<String, String>, ) -> CompositeBlocker
Register a field-name remap for records from source.
remap maps b_field to a_field so that the source-B fields are
visible under canonical source-A names during blocking key extraction.
Trait Implementations§
Source§impl Blocker for CompositeBlocker
impl Blocker for CompositeBlocker
fn blocking_keys(&self, record: &Record, schema: &Schema) -> Vec<String>
fn index_record( &self, record: &Record, schema: &Schema, index: &mut dyn BlockIndex, )
fn candidates( &self, record: &Record, schema: &Schema, index: &dyn BlockIndex, ) -> Vec<u64>
Source§impl Default for CompositeBlocker
impl Default for CompositeBlocker
Source§fn default() -> CompositeBlocker
fn default() -> CompositeBlocker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompositeBlocker
impl !RefUnwindSafe for CompositeBlocker
impl Send for CompositeBlocker
impl Sync for CompositeBlocker
impl Unpin for CompositeBlocker
impl UnsafeUnpin for CompositeBlocker
impl !UnwindSafe for CompositeBlocker
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