[−][src]Struct cranky::ResultRecord
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]
fn parse_record(
record_line: &str,
id_factory: Option<&mut StringIdFactory>
) -> Result<Self, Error>
[src]
record_line: &str,
id_factory: Option<&mut StringIdFactory>
) -> Result<Self, Error>
impl Eq for ResultRecord
[src]
impl PartialOrd<ResultRecord> for ResultRecord
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<ResultRecord> for ResultRecord
[src]
impl Ord for ResultRecord
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl Debug for ResultRecord
[src]
impl Display for ResultRecord
[src]
Auto Trait Implementations
impl !Send for ResultRecord
impl Unpin for ResultRecord
impl !Sync for ResultRecord
impl UnwindSafe for ResultRecord
impl !RefUnwindSafe for ResultRecord
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,