Struct tini::Section [−][src]
pub struct Section { /* fields omitted */ }
Implementations
Get scalar value of key
- output type
T
must implement FromStr trait for auto conversion
Example
let conf = Ini::from_string("[section]\nkey=1\nvalue=2").unwrap();
for (name, section) in conf.iter() {
let key = section.get("key");
let value = section.get("value");
assert_eq!(key, Some(1));
assert_eq!(value, Some(2));
}
pub fn iter(&self) -> SectionIter<'_>ⓘNotable traits for SectionIter<'a>impl<'a> Iterator for SectionIter<'a> type Item = (&'a String, &'a String);
Notable traits for SectionIter<'a>
impl<'a> Iterator for SectionIter<'a> type Item = (&'a String, &'a String);
pub fn iter_mut(&mut self) -> SectionIterMut<'_>ⓘNotable traits for SectionIterMut<'a>impl<'a> Iterator for SectionIterMut<'a> type Item = (&'a String, &'a mut String);
Notable traits for SectionIterMut<'a>
impl<'a> Iterator for SectionIterMut<'a> type Item = (&'a String, &'a mut String);