pub struct ContextSelector<S, T> { /* private fields */ }Implementations§
Source§impl<S, T> ContextSelector<S, T>where
S: Scorer,
T: TokenCounter,
impl<S, T> ContextSelector<S, T>where
S: Scorer,
T: TokenCounter,
pub fn new(scorer: S, tokenizer: T) -> Self
pub fn select( &self, cache: &ContextCache, query: Query, budget: usize, ) -> Result<SelectionResult, SelectionError>
Trait Implementations§
Auto Trait Implementations§
impl<S, T> Freeze for ContextSelector<S, T>
impl<S, T> RefUnwindSafe for ContextSelector<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for ContextSelector<S, T>
impl<S, T> Sync for ContextSelector<S, T>
impl<S, T> Unpin for ContextSelector<S, T>
impl<S, T> UnwindSafe for ContextSelector<S, T>where
S: UnwindSafe,
T: UnwindSafe,
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