pub struct LabelEnricher { /* private fields */ }Implementations§
Source§impl LabelEnricher
impl LabelEnricher
pub fn new() -> Self
pub fn bind(self, source: impl Into<String>, key: impl Into<String>) -> Self
pub fn from_entity<E: SearchEntity>(self) -> Self
pub fn with_loader<L: LabelLoader + 'static>(self, loader: L) -> Self
pub fn with_budget(self, max_ids: usize, timeout: Duration) -> Self
pub fn with_missing_policy(self, policy: MissingLabelPolicy) -> Self
pub fn with_failure_policy(self, policy: LabelFailurePolicy) -> Self
pub fn with_concurrency(self, maximum: usize) -> Result<Self, ConfigError>
Sourcepub fn with_cache(
self,
capacity: usize,
ttl: Duration,
) -> Result<Self, ConfigError>
pub fn with_cache( self, capacity: usize, ttl: Duration, ) -> Result<Self, ConfigError>
Optional positive-result cache. Cache ownership is this enricher and its clones, never global. Use distinct instances for different tenant/locale dictionaries; remote request-dependent loaders should leave it disabled.
Trait Implementations§
Source§impl Clone for LabelEnricher
impl Clone for LabelEnricher
Source§impl Debug for LabelEnricher
impl Debug for LabelEnricher
Source§impl Default for LabelEnricher
impl Default for LabelEnricher
Source§impl PageEnricher for LabelEnricher
impl PageEnricher for LabelEnricher
fn enrich( &self, page: Page<RowMap>, context: EnrichContext, ) -> ExtensionFuture<Page<RowMap>>
Source§impl<T: LabelTarget> TypedPageEnricher<T> for LabelEnricher
impl<T: LabelTarget> TypedPageEnricher<T> for LabelEnricher
fn enrich( &self, rows: Vec<T>, context: EnrichContext, ) -> ExtensionFuture<Vec<T>>
Auto Trait Implementations§
impl !RefUnwindSafe for LabelEnricher
impl !UnwindSafe for LabelEnricher
impl Freeze for LabelEnricher
impl Send for LabelEnricher
impl Sync for LabelEnricher
impl Unpin for LabelEnricher
impl UnsafeUnpin for LabelEnricher
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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