pub struct ConfigSection {
pub name: String,
/* private fields */
}Expand description
Configuration section (matching C++ ConfigSection)
Fields§
§name: StringSection name (e.g., “zooserver”, “zusnet”)
Implementations§
Source§impl ConfigSection
impl ConfigSection
pub fn new(name: String) -> Self
Sourcepub fn get_string(&self, key: &str, default: &str) -> String
pub fn get_string(&self, key: &str, default: &str) -> String
Get a string value
Sourcepub fn get_integer(&self, key: &str, default: i32) -> i32
pub fn get_integer(&self, key: &str, default: i32) -> i32
Get an integer value
Sourcepub fn get_all_pairs(&self) -> HashMap<String, String>
pub fn get_all_pairs(&self) -> HashMap<String, String>
Get all key-value pairs
Sourcepub fn contains_key(&self, key: &str) -> bool
pub fn contains_key(&self, key: &str) -> bool
Check if a key exists
Trait Implementations§
Source§impl Clone for ConfigSection
impl Clone for ConfigSection
Source§fn clone(&self) -> ConfigSection
fn clone(&self) -> ConfigSection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConfigSection
impl RefUnwindSafe for ConfigSection
impl Send for ConfigSection
impl Sync for ConfigSection
impl Unpin for ConfigSection
impl UnwindSafe for ConfigSection
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