Spaces:
Running
Running
neon_arch
commited on
Commit
·
9cb582a
1
Parent(s):
25d6af0
✨ feat: improve code documentation
Browse files- src/config/parser.rs +1 -0
- src/engines/duckduckgo.rs +1 -0
- src/engines/searx.rs +1 -0
- src/results/aggregator.rs +1 -0
src/config/parser.rs
CHANGED
|
@@ -22,6 +22,7 @@ static CONFIG_FILE_NAME: &str = "config.lua";
|
|
| 22 |
/// * `logging` - It stores the option to whether enable or disable logs.
|
| 23 |
/// * `debug` - It stores the option to whether enable or disable debug mode.
|
| 24 |
/// * `upstream_search_engines` - It stores all the engine names that were enabled by the user.
|
|
|
|
| 25 |
#[derive(Clone)]
|
| 26 |
pub struct Config {
|
| 27 |
pub port: u16,
|
|
|
|
| 22 |
/// * `logging` - It stores the option to whether enable or disable logs.
|
| 23 |
/// * `debug` - It stores the option to whether enable or disable debug mode.
|
| 24 |
/// * `upstream_search_engines` - It stores all the engine names that were enabled by the user.
|
| 25 |
+
/// * `request_timeout` - It stores the time (secs) which controls the server request timeout.
|
| 26 |
#[derive(Clone)]
|
| 27 |
pub struct Config {
|
| 28 |
pub port: u16,
|
src/engines/duckduckgo.rs
CHANGED
|
@@ -29,6 +29,7 @@ impl SearchEngine for DuckDuckGo {
|
|
| 29 |
/// * `query` - Takes the user provided query to query to the upstream search engine with.
|
| 30 |
/// * `page` - Takes an u32 as an argument.
|
| 31 |
/// * `user_agent` - Takes a random user agent string as an argument.
|
|
|
|
| 32 |
///
|
| 33 |
/// # Errors
|
| 34 |
///
|
|
|
|
| 29 |
/// * `query` - Takes the user provided query to query to the upstream search engine with.
|
| 30 |
/// * `page` - Takes an u32 as an argument.
|
| 31 |
/// * `user_agent` - Takes a random user agent string as an argument.
|
| 32 |
+
/// * `request_timeout` - Takes a time (secs) as a value which controls the server request timeout.
|
| 33 |
///
|
| 34 |
/// # Errors
|
| 35 |
///
|
src/engines/searx.rs
CHANGED
|
@@ -27,6 +27,7 @@ impl SearchEngine for Searx {
|
|
| 27 |
/// * `query` - Takes the user provided query to query to the upstream search engine with.
|
| 28 |
/// * `page` - Takes an u32 as an argument.
|
| 29 |
/// * `user_agent` - Takes a random user agent string as an argument.
|
|
|
|
| 30 |
///
|
| 31 |
/// # Errors
|
| 32 |
///
|
|
|
|
| 27 |
/// * `query` - Takes the user provided query to query to the upstream search engine with.
|
| 28 |
/// * `page` - Takes an u32 as an argument.
|
| 29 |
/// * `user_agent` - Takes a random user agent string as an argument.
|
| 30 |
+
/// * `request_timeout` - Takes a time (secs) as a value which controls the server request timeout.
|
| 31 |
///
|
| 32 |
/// # Errors
|
| 33 |
///
|
src/results/aggregator.rs
CHANGED
|
@@ -51,6 +51,7 @@ type FutureVec = Vec<JoinHandle<Result<HashMap<String, RawSearchResult>, Report<
|
|
| 51 |
/// * `random_delay` - Accepts a boolean value to add a random delay before making the request.
|
| 52 |
/// * `debug` - Accepts a boolean value to enable or disable debug mode option.
|
| 53 |
/// * `upstream_search_engines` - Accepts a vector of search engine names which was selected by the
|
|
|
|
| 54 |
/// user through the UI or the config file.
|
| 55 |
///
|
| 56 |
/// # Error
|
|
|
|
| 51 |
/// * `random_delay` - Accepts a boolean value to add a random delay before making the request.
|
| 52 |
/// * `debug` - Accepts a boolean value to enable or disable debug mode option.
|
| 53 |
/// * `upstream_search_engines` - Accepts a vector of search engine names which was selected by the
|
| 54 |
+
/// * `request_timeout` - Accepts a time (secs) as a value which controls the server request timeout.
|
| 55 |
/// user through the UI or the config file.
|
| 56 |
///
|
| 57 |
/// # Error
|