pub struct Config { /* private fields */ }Implementations§
Source§impl Config
impl Config
pub fn new() -> Self
pub fn set_path(&self, path: PathBuf) -> Result<()>
pub fn has_config(&self) -> bool
pub fn get_path(&self) -> PathBuf
pub fn update_config(&self) -> Result<()>
pub fn get_string(&self, section: &str, key: &str) -> Result<Option<String>>
pub fn get_bool(&self, section: &str, key: &str) -> Result<bool>
pub fn get_int(&self, section: &str, key: &str) -> Result<Option<i32>>
pub fn get_threshold(&self, mode: &str) -> Result<u8>
pub fn has_option(&self, section: &str, key: &str) -> bool
pub fn get(&self, section: &str, key: &str, fallback: &str) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Unpin for Config
impl UnsafeUnpin 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