From c5c4b28b2c4954014290087422a2d7c56a48141d Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Mon, 11 Apr 2022 23:47:41 -0500 Subject: [PATCH] Use a struct for library options. Signed-off-by: Eduard Tolosa --- src/structs.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/structs.rs b/src/structs.rs index 170b3a0..e4aff0a 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -1,3 +1,5 @@ +use std::collections::HashSet; + #[allow(clippy::upper_case_acronyms)] #[derive(Clone, Debug, Eq, PartialEq, Hash, Default)] pub struct HTTPFilters { @@ -24,3 +26,17 @@ pub struct HttpData { pub html_file_path: String, pub screenshot_data: Vec, } + +#[derive(Clone, Debug, Default)] +pub struct LibOptions { + pub hosts: HashSet, + pub client: reqwest::Client, + pub user_agents: Vec, + pub retries: usize, + pub threads: usize, + pub return_filters: bool, + pub conditional_response_code: u16, + pub show_status_codes: bool, + pub assign_response_data: bool, + pub quiet_flag: bool, +}