Zsombor Gegesy commited on
Commit
32abacb
1 Parent(s): 57c73d3

Fix missing doc errors

Browse files
src/engines/duckduckgo.rs CHANGED
@@ -18,7 +18,7 @@ use super::search_result_parser::SearchResultParser;
18
  /// A new DuckDuckGo engine type defined in-order to implement the `SearchEngine` trait which allows to
19
  /// reduce code duplication as well as allows to create vector of different search engines easily.
20
  pub struct DuckDuckGo {
21
- // The parser, used to interpret the search result.
22
  parser: SearchResultParser,
23
  }
24
 
 
18
  /// A new DuckDuckGo engine type defined in-order to implement the `SearchEngine` trait which allows to
19
  /// reduce code duplication as well as allows to create vector of different search engines easily.
20
  pub struct DuckDuckGo {
21
+ /// The parser, used to interpret the search result.
22
  parser: SearchResultParser,
23
  }
24
 
src/engines/search_result_parser.rs CHANGED
@@ -7,10 +7,15 @@ use scraper::{html::Select, ElementRef, Html, Selector};
7
 
8
  /// A html search result parser, based on a predefined CSS selectors.
9
  pub struct SearchResultParser {
 
10
  no_result: Selector,
 
11
  results: Selector,
 
12
  result_title: Selector,
 
13
  result_url: Selector,
 
14
  result_desc: Selector,
15
  }
16
 
 
7
 
8
  /// A html search result parser, based on a predefined CSS selectors.
9
  pub struct SearchResultParser {
10
+ /// selector to locate the element which is displayed, if there were nothing found.
11
  no_result: Selector,
12
+ /// selector to locate the element which contains one item from the search result.
13
  results: Selector,
14
+ /// selector to locate the title relative to the search result item.
15
  result_title: Selector,
16
+ /// selector to locate the url relative to the search result item.
17
  result_url: Selector,
18
+ /// selector to locate the description relative to the search result item.
19
  result_desc: Selector,
20
  }
21
 
src/engines/searx.rs CHANGED
@@ -14,7 +14,7 @@ use error_stack::{Report, Result, ResultExt};
14
  /// A new Searx engine type defined in-order to implement the `SearchEngine` trait which allows to
15
  /// reduce code duplication as well as allows to create vector of different search engines easily.
16
  pub struct Searx {
17
- // The parser, used to interpret the search result.
18
  parser: SearchResultParser,
19
  }
20
 
 
14
  /// A new Searx engine type defined in-order to implement the `SearchEngine` trait which allows to
15
  /// reduce code duplication as well as allows to create vector of different search engines easily.
16
  pub struct Searx {
17
+ /// The parser, used to interpret the search result.
18
  parser: SearchResultParser,
19
  }
20