pub struct Hit<Id> {
pub id: Id,
pub score: f64,
}Expand description
A search result with its normalized relevance score.
Scores range from 0.0 to 1.0 and are meaningful for comparing results
from the same search query. Results are sorted by this score, with insertion
order used as the final tie-breaker.
Fields§
§id: IdThe id associated with the matched entry.
score: f64A normalized relevance score in the 0.0..=1.0 range.
Trait Implementations§
impl<Id> StructuralPartialEq for Hit<Id>
Auto Trait Implementations§
impl<Id> Freeze for Hit<Id>where
Id: Freeze,
impl<Id> RefUnwindSafe for Hit<Id>where
Id: RefUnwindSafe,
impl<Id> Send for Hit<Id>where
Id: Send,
impl<Id> Sync for Hit<Id>where
Id: Sync,
impl<Id> Unpin for Hit<Id>where
Id: Unpin,
impl<Id> UnsafeUnpin for Hit<Id>where
Id: UnsafeUnpin,
impl<Id> UnwindSafe for Hit<Id>where
Id: 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