[][src]Struct cranky::ResultRecord

pub struct ResultRecord {
    pub qid: Qid,
    pub docid: Docid,
    pub rank: Rank,
    pub score: Score,
    pub iter: Iter,
    pub run: Option<Run>,
    // some fields omitted
}

Result record.

Examples

The separator could be any number of whitespaces.

let record_line = "030  Q0\tZF08-175-870  0 \t 4238   prise1";
let record: ResultRecord = Record::parse_record(record_line, None)?;

You can use StringIdFactory to reuse string-based IDs.

let mut id_factory = StringIdFactory::new();
let record_line = "030  Q0\tZF08-175-870  0 \t 4238   prise1";
let record: ResultRecord = Record::parse_record(record_line, Some(&mut id_factory))?;

When formating to a string, all separators are tabs:

assert_eq!(
    &format!("{}", record),
    "030\tQ0\tZF08-175-870\t0\t4238\tprise1"
);

Fields

qid: Qid

Query TREC ID.

docid: Docid

Document TREC ID.

rank: Rank

Rank of the document in query result set. The lower the number, the higher the document is ranked.

score: Score

Score of the document in query result set. The higher the number, the higher the document is ranked.

iter: Iter

Iteration.

run: Option<Run>

Run ID.

Trait Implementations

impl Record for ResultRecord[src]

impl Eq for ResultRecord[src]

impl PartialOrd<ResultRecord> for ResultRecord[src]

impl PartialEq<ResultRecord> for ResultRecord[src]

impl Ord for ResultRecord[src]

impl Debug for ResultRecord[src]

impl Display for ResultRecord[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]