pub struct SettingsManager { /* private fields */ }Implementations§
Source§impl SettingsManager
impl SettingsManager
pub fn new() -> Self
pub async fn load_settings(&self) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_setting(&self, key: &str) -> Option<String>
pub async fn set_setting( &self, key: &str, value: &str, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_disconnect_timeout(&self) -> Option<u32>
pub async fn set_disconnect_timeout( &self, minutes: u32, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_network_monitor(&self) -> bool
pub async fn set_network_monitor( &self, enabled: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_http_logs_default_enabled(&self) -> bool
pub async fn set_http_logs_default_enabled( &self, enabled: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_http_logs_max_file_size(&self) -> u64
pub async fn set_http_logs_max_file_size( &self, size: u64, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_http_logs_retention_days(&self) -> u64
pub async fn set_http_logs_retention_days( &self, days: u64, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_auto_update_enabled(&self) -> bool
pub async fn set_auto_update_enabled( &self, enabled: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_last_update_check(&self) -> Option<i64>
pub async fn set_last_update_check( &self, timestamp: i64, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_all_settings(&self) -> HashMap<String, String>
pub async fn get_app_settings(&self) -> AppSettings
pub async fn set_app_settings( &self, app_settings: &AppSettings, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_ssl_enabled(&self) -> bool
pub async fn set_ssl_enabled( &self, enabled: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_ssl_cert_validity_days(&self) -> u16
pub async fn set_ssl_cert_validity_days( &self, days: u16, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_ssl_auto_regenerate(&self) -> bool
pub async fn set_ssl_auto_regenerate( &self, enabled: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_ssl_ca_auto_install(&self) -> bool
pub async fn set_ssl_ca_auto_install( &self, enabled: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_global_shortcut(&self) -> String
pub async fn set_global_shortcut( &self, shortcut: &str, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_mcp_server_enabled(&self) -> bool
pub async fn set_mcp_server_enabled( &self, enabled: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn get_mcp_server_port(&self) -> u16
pub async fn set_mcp_server_port( &self, port: u16, ) -> Result<(), Box<dyn Error + Send + Sync>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SettingsManager
impl !UnwindSafe for SettingsManager
impl Freeze for SettingsManager
impl Send for SettingsManager
impl Sync for SettingsManager
impl Unpin for SettingsManager
impl UnsafeUnpin for SettingsManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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