Skip to main content

SearchPostProcess

Trait SearchPostProcess 

Source
pub trait SearchPostProcess<A, T, O = <A as HasId>::Id>
where A: HasId,
{ type Error: StandardError; // Required method fn post_process<I, B>( &self, accessor: &mut A, query: T, candidates: I, output: &mut B, ) -> impl Future<Output = Result<usize, Self::Error>> + Send where I: Iterator<Item = Neighbor<A::Id>> + Send, B: SearchOutputBuffer<O> + Send + ?Sized; }
Expand description

Perform post-processing on the results of search, storing the results in an output buffer.

Simple implementations include CopyIds, which simply forwards the search results directly into the output buffer.

Required Associated Types§

Required Methods§

Source

fn post_process<I, B>( &self, accessor: &mut A, query: T, candidates: I, output: &mut B, ) -> impl Future<Output = Result<usize, Self::Error>> + Send
where I: Iterator<Item = Neighbor<A::Id>> + Send, B: SearchOutputBuffer<O> + Send + ?Sized,

Populate output with the entries in candidates. Correct implementations must return the number of results copied into output on success.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A, T, O, Head, Tail> SearchPostProcess<A, T, O> for Pipeline<Head, Tail>
where A: HasId, Head: SearchPostProcessStep<A, T, O>, Tail: SearchPostProcess<Head::NextAccessor, T, O> + Sync,

Source§

type Error = <Head as SearchPostProcessStep<A, T, O>>::Error<<Tail as SearchPostProcess<<Head as SearchPostProcessStep<A, T, O>>::NextAccessor, T, O>>::Error>

Source§

impl<A, T> SearchPostProcess<A, T> for CopyIds
where A: HasId,