pub struct Config { /* private fields */ }Implementations§
Source§impl Config
impl Config
Sourcepub fn get<T: AsRef<str>>(&self, k: T) -> Option<&str>
pub fn get<T: AsRef<str>>(&self, k: T) -> Option<&str>
Get an entry by path. If the input argument contains dots, the path is split into keys, each key being requested recursively.
Sourcepub fn get_usize<T: AsRef<str>>(&self, k: T) -> Option<usize>
pub fn get_usize<T: AsRef<str>>(&self, k: T) -> Option<usize>
Get an entry of type integer by path
Sourcepub fn get_bool<T: AsRef<str>>(&self, k: T) -> Option<bool>
pub fn get_bool<T: AsRef<str>>(&self, k: T) -> Option<bool>
Get an entry of type boolean by path
Sourcepub fn add_section<T: AsRef<str>, V: ToString>(
&mut self,
parent: T,
table_name: V,
) -> Option<()>
pub fn add_section<T: AsRef<str>, V: ToString>( &mut self, parent: T, table_name: V, ) -> Option<()>
Add a new section at location path. To insert at root, use an empty path.
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