pub enum PostprocessStrategy<'a> {
AcceptAll,
Apply(&'a (dyn Fn(&u32) -> bool + Send + Sync)),
}Expand description
Encodes whether to accept all candidates at rerank time or apply a
specific predicate. Used by RerankAndFilter and
DeterminantDiversityAndFilter instead of Option<PostprocessFilter>
so call sites are self-documenting without relying on comments to
explain what None means.
Variants§
AcceptAll
Accept every candidate — no predicate is called. Used by FlatScan
(filtered at scan time) and InlineFilter (filtered at visit time).
Apply(&'a (dyn Fn(&u32) -> bool + Send + Sync))
Apply the given predicate; non-matching candidates are dropped.
Trait Implementations§
Source§impl<'a> Clone for PostprocessStrategy<'a>
impl<'a> Clone for PostprocessStrategy<'a>
Source§fn clone(&self) -> PostprocessStrategy<'a>
fn clone(&self) -> PostprocessStrategy<'a>
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 moreimpl<'a> Copy for PostprocessStrategy<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PostprocessStrategy<'a>
impl<'a> !UnwindSafe for PostprocessStrategy<'a>
impl<'a> Freeze for PostprocessStrategy<'a>
impl<'a> Send for PostprocessStrategy<'a>
impl<'a> Sync for PostprocessStrategy<'a>
impl<'a> Unpin for PostprocessStrategy<'a>
impl<'a> UnsafeUnpin for PostprocessStrategy<'a>
Blanket Implementations§
impl<T> AsyncFriendly for T
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