pub struct Config {
pub verbose: u8,
pub lemmeknow_config: Identifier,
pub human_checker_on: bool,
pub timeout: u32,
pub api_mode: bool,
pub regex: Option<String>,
}
Expand description
Library input is the default API input The CLI turns its arguments into a LibraryInput struct The Config object is a default configuration object For the entire program It’s access using a variable like configuration
use ares::config::get_config;
let config = get_config();
assert_eq!(config.verbose, 0);
Fields§
§verbose: u8
A level of verbosity to determine. How much we print in logs.
lemmeknow_config: Identifier
The lemmeknow config to use
human_checker_on: bool
Should the human checker be on? This asks yes/no for plaintext. Turn off for API
timeout: u32
The timeout threshold before Ares quites This is in seconds
api_mode: bool
Is the program being run in API mode? This is used to determine if we should print to stdout Or return the values
regex: Option<String>
Regex enables the user to search for a specific regex or crib
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more