pub struct INI {
pub data: HashMap<String, Vec<String>>,
}
Expand description
The fields can be modified before using their relative function calls See ‘load()’ for ’prefix and ‘get/set_kvp()’ for ‘delim’, respectively.
Fields§
§data: HashMap<String, Vec<String>>
Implementations§
Source§impl INI
impl INI
pub fn new() -> Self
pub fn get(&self, key: &String) -> Result<Vec<String>, ErrorKind>
pub fn set(&mut self, key: &String, val: Vec<String>)
Sourcepub fn get_kvp(
&self,
key: &String,
delimiter: Option<char>,
) -> HashMap<String, String>
pub fn get_kvp( &self, key: &String, delimiter: Option<char>, ) -> HashMap<String, String>
Default delimiter is ‘=’
Sourcepub fn set_kvp(
&mut self,
key: &String,
val: HashMap<String, String>,
delimiter: Option<char>,
)
pub fn set_kvp( &mut self, key: &String, val: HashMap<String, String>, delimiter: Option<char>, )
Default delimiter is ‘=’
Sourcepub fn load(
&mut self,
ini_path: &str,
prefix: Option<String>,
) -> Result<(), String>
pub fn load( &mut self, ini_path: &str, prefix: Option<String>, ) -> Result<(), String>
Be sure to add an underscore if desired for ‘prefix’.
pub fn save(&self, ini_path: &str)
Auto Trait Implementations§
impl Freeze for INI
impl RefUnwindSafe for INI
impl Send for INI
impl Sync for INI
impl Unpin for INI
impl UnwindSafe for INI
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