pub struct ScoredDoc {
pub index: usize,
pub score: f32,
pub text: Option<String>,
}Expand description
A single scored document returned by a RerankerModel.
Fields§
§index: usizeZero-based index into the original docs slice passed to
RerankerModel::rerank.
score: f32Relevance score assigned by the reranker (higher is more relevant).
text: Option<String>The document text, if the provider returns it. May be None.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScoredDoc
impl RefUnwindSafe for ScoredDoc
impl Send for ScoredDoc
impl Sync for ScoredDoc
impl Unpin for ScoredDoc
impl UnwindSafe for ScoredDoc
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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