From 32abacb4c30d1c3756d2e5d5a15a7818445b1ddd Mon Sep 17 00:00:00 2001 From: Zsombor Gegesy Date: Mon, 25 Sep 2023 00:00:06 +0200 Subject: [PATCH] Fix missing doc errors --- src/engines/duckduckgo.rs | 2 +- src/engines/search_result_parser.rs | 5 +++++ src/engines/searx.rs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/engines/duckduckgo.rs b/src/engines/duckduckgo.rs index 8a28dda..352a33b 100644 --- a/src/engines/duckduckgo.rs +++ b/src/engines/duckduckgo.rs @@ -18,7 +18,7 @@ use super::search_result_parser::SearchResultParser; /// A new DuckDuckGo engine type defined in-order to implement the `SearchEngine` trait which allows to /// reduce code duplication as well as allows to create vector of different search engines easily. pub struct DuckDuckGo { - // The parser, used to interpret the search result. + /// The parser, used to interpret the search result. parser: SearchResultParser, } diff --git a/src/engines/search_result_parser.rs b/src/engines/search_result_parser.rs index 94fe0e8..0512bdd 100644 --- a/src/engines/search_result_parser.rs +++ b/src/engines/search_result_parser.rs @@ -7,10 +7,15 @@ use scraper::{html::Select, ElementRef, Html, Selector}; /// A html search result parser, based on a predefined CSS selectors. pub struct SearchResultParser { + /// selector to locate the element which is displayed, if there were nothing found. no_result: Selector, + /// selector to locate the element which contains one item from the search result. results: Selector, + /// selector to locate the title relative to the search result item. result_title: Selector, + /// selector to locate the url relative to the search result item. result_url: Selector, + /// selector to locate the description relative to the search result item. result_desc: Selector, } diff --git a/src/engines/searx.rs b/src/engines/searx.rs index ca08b98..79c1e95 100644 --- a/src/engines/searx.rs +++ b/src/engines/searx.rs @@ -14,7 +14,7 @@ use error_stack::{Report, Result, ResultExt}; /// A new Searx engine type defined in-order to implement the `SearchEngine` trait which allows to /// reduce code duplication as well as allows to create vector of different search engines easily. pub struct Searx { - // The parser, used to interpret the search result. + /// The parser, used to interpret the search result. parser: SearchResultParser, }