pub struct LabelEnricher { /* private fields */ }Implementations§
Source§impl LabelEnricher
impl LabelEnricher
pub fn new() -> LabelEnricher
pub fn bind( self, source: impl Into<String>, key: impl Into<String>, ) -> LabelEnricher
pub fn from_entity<E>(self) -> LabelEnricherwhere
E: SearchEntity,
pub fn with_loader<L>(self, loader: L) -> LabelEnricherwhere
L: LabelLoader + 'static,
pub fn with_budget(self, max_ids: usize, timeout: Duration) -> LabelEnricher
pub fn with_missing_policy(self, policy: MissingLabelPolicy) -> LabelEnricher
pub fn with_failure_policy(self, policy: LabelFailurePolicy) -> LabelEnricher
pub fn with_concurrency( self, maximum: usize, ) -> Result<LabelEnricher, ConfigError>
Sourcepub fn with_cache(
self,
capacity: usize,
ttl: Duration,
) -> Result<LabelEnricher, ConfigError>
pub fn with_cache( self, capacity: usize, ttl: Duration, ) -> Result<LabelEnricher, 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§fn clone(&self) -> LabelEnricher
fn clone(&self) -> LabelEnricher
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 moreSource§impl Debug for LabelEnricher
impl Debug for LabelEnricher
Source§impl Default for LabelEnricher
impl Default for LabelEnricher
Source§fn default() -> LabelEnricher
fn default() -> LabelEnricher
Returns the “default value” for a type. Read more
Source§impl PageEnricher for LabelEnricher
impl PageEnricher for LabelEnricher
Source§impl<T> TypedPageEnricher<T> for LabelEnricherwhere
T: LabelTarget,
impl<T> TypedPageEnricher<T> for LabelEnricherwhere
T: LabelTarget,
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