caio.co/de/cantine

Add missing docs to exported things

And enable `missing_docs` and `missing_doc_code_examples`
Id
1af5276eb975806b86565db51570cc41f1ad9739
Author
Caio
Commit time
2020-03-20T08:07:28+01:00

Modified tique/src/lib.rs

@@ -1,3 +1,5
+#![warn(missing_docs)]
+#![warn(missing_doc_code_examples)]
//! Utilities to drive a tantivy search index
//!
//! # Overview

Modified tique/src/topterms.rs

@@ -248,6 +248,7
self.0.len()
}

+ /// Check if this keywords set contains no terms
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}

Modified tique/src/conditional_collector/traits.rs

@@ -8,7 +8,12
/// before considering a matching document for inclusion in the
/// top results.
pub trait ConditionForSegment<T>: Clone {
+ /// The concrete type of the result from calling `for_segment`
type Type: CheckCondition<T>;
+
+ /// Creates a `Self::Type` instance responsible for checking if
+ /// the matching documents in the given segment reader are to
+ /// be considered as collection candidates.
fn for_segment(&self, reader: &SegmentReader) -> Self::Type;
}

@@ -44,6 +49,10
/// a document to appear in the results it must first return true
/// for `check`.
pub trait CheckCondition<T>: 'static + Clone {
+ /// Decides wether the given document is a valid candidate or not
+ ///
+ /// The `ascending` parameter signals the ordering chosen via
+ /// `Ascending` or `Descending`
fn check(&self, segment_id: SegmentLocalId, doc_id: DocId, score: T, ascending: bool) -> bool;
}