pub struct IndexQueryResult {
pub package: OfficialPackage,
pub fuzzy_score: Option<i64>,
}Expand description
What: Search result with optional fuzzy matching score.
Inputs:
- Created by search functions that match packages against queries.
Output:
- Contains the matched package and its fuzzy score (if fuzzy matching was used).
Details:
- Used to return search results with relevance scores for sorting.
fuzzy_scoreisNonefor exact or substring matches.fuzzy_scoreisSome(i64)when fuzzy matching is enabled, with higher scores indicating better matches.
Fields§
§package: OfficialPackageThe matched package.
fuzzy_score: Option<i64>Fuzzy matching score, if fuzzy matching was used.
Trait Implementations§
Source§impl Clone for IndexQueryResult
impl Clone for IndexQueryResult
Source§fn clone(&self) -> IndexQueryResult
fn clone(&self) -> IndexQueryResult
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 moreSource§impl Debug for IndexQueryResult
impl Debug for IndexQueryResult
Source§impl<'de> Deserialize<'de> for IndexQueryResult
impl<'de> Deserialize<'de> for IndexQueryResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IndexQueryResult
impl RefUnwindSafe for IndexQueryResult
impl Send for IndexQueryResult
impl Sync for IndexQueryResult
impl Unpin for IndexQueryResult
impl UnsafeUnpin for IndexQueryResult
impl UnwindSafe for IndexQueryResult
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