pub struct Config {
pub max_messages: usize,
pub typewriter_delay: Duration,
pub input_max_length: usize,
pub max_history: usize,
pub poll_rate: Duration,
pub log_level: String,
pub theme: Theme,
pub current_theme_name: String,
pub language: String,
pub debug_info: Option<String>,
/* private fields */
}Fields§
§max_messages: usize§typewriter_delay: Duration§input_max_length: usize§max_history: usize§poll_rate: Duration§log_level: String§theme: Theme§current_theme_name: String§language: String§debug_info: Option<String>Implementations§
Source§impl Config
impl Config
pub async fn load() -> Result<Self>
pub async fn load_with_messages(show_messages: bool) -> Result<Self>
pub async fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub async fn save(&self) -> Result<()>
pub async fn change_theme(&mut self, theme_name: &str) -> Result<()>
pub fn get_performance_info(&self) -> String
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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