[][src]Trait vindicator::SearchEntry

pub trait SearchEntry {
    type Id: Eq;
    fn id(&self) -> &Self::Id;

    fn score(&self) -> Score { ... }
fn to_entry(&self) -> EntryInfo<Self::Id>
    where
        Self::Id: Clone
, { ... } }

A search result entry with a unique document identifier and a similarity score. Types need to implement this type in order to be admitted as a search result.

Associated Types

type Id: Eq

The unique document identifier type.

Loading content...

Required methods

fn id(&self) -> &Self::Id

Retrieves this entry's document ID.

Loading content...

Provided methods

fn score(&self) -> Score

Retrieves this entry's similarity score.

fn to_entry(&self) -> EntryInfo<Self::Id> where
    Self::Id: Clone

Constructs a minimalist entry info data structure.

Loading content...

Implementations on Foreign Types

impl<'a, T: ?Sized> SearchEntry for &'a T where
    T: SearchEntry
[src]

type Id = T::Id

Loading content...

Implementors

impl SearchEntry for TrecEntryOwned[src]

type Id = String

fn to_entry(&self) -> EntryInfo<Self::Id> where
    Self::Id: Clone
[src]

impl<'a> SearchEntry for TrecEntry<'a>[src]

type Id = &'a str

fn to_entry(&self) -> EntryInfo<Self::Id> where
    Self::Id: Clone
[src]

impl<I> SearchEntry for EntryInfo<I> where
    I: Eq
[src]

type Id = I

impl<I> SearchEntry for RankedEntryInfo<I> where
    I: Eq
[src]

type Id = I

fn to_entry(&self) -> EntryInfo<Self::Id> where
    Self::Id: Clone
[src]

impl<T> SearchEntry for Ranked<T> where
    T: SearchEntry
[src]

type Id = T::Id

fn to_entry(&self) -> EntryInfo<Self::Id> where
    Self::Id: Clone
[src]

Loading content...