pub struct Ini { /* private fields */ }Expand description
Ini struct
Implementations§
Source§impl Ini
impl Ini
Sourcepub fn with_section<S>(&mut self, section: Option<S>) -> SectionSetter<'_>
pub fn with_section<S>(&mut self, section: Option<S>) -> SectionSetter<'_>
Set with a specified section, None is for the general section
Sourcepub fn general_section(&self) -> &Properties
pub fn general_section(&self) -> &Properties
Get the immmutable general section
Sourcepub fn general_section_mut(&mut self) -> &mut Properties
pub fn general_section_mut(&mut self) -> &mut Properties
Get the mutable general section
Sourcepub fn section<S>(&self, name: Option<S>) -> Option<&Properties>
pub fn section<S>(&self, name: Option<S>) -> Option<&Properties>
Get a immutable section
Sourcepub fn section_mut<S>(&mut self, name: Option<S>) -> Option<&mut Properties>
pub fn section_mut<S>(&mut self, name: Option<S>) -> Option<&mut Properties>
Get a mutable section
Sourcepub fn entry(
&mut self,
name: Option<String>,
) -> Entry<'_, Option<String>, Properties>
pub fn entry( &mut self, name: Option<String>, ) -> Entry<'_, Option<String>, Properties>
Get the entry
Sourcepub fn set_to<S>(&mut self, section: Option<S>, key: String, value: String)
pub fn set_to<S>(&mut self, section: Option<S>, key: String, value: String)
Set key-value to a section
Source§impl Ini
impl Ini
Sourcepub fn load_from_str(buf: &str) -> Result<Ini, ParseError>
pub fn load_from_str(buf: &str) -> Result<Ini, ParseError>
Load from a string
Sourcepub fn load_from_str_noescape(buf: &str) -> Result<Ini, ParseError>
pub fn load_from_str_noescape(buf: &str) -> Result<Ini, ParseError>
Load from a string, but do not interpret ’' as an escape character
Sourcepub fn load_from_str_opt(buf: &str, opt: ParseOption) -> Result<Ini, ParseError>
pub fn load_from_str_opt(buf: &str, opt: ParseOption) -> Result<Ini, ParseError>
Load from a string with options
Sourcepub fn read_from_noescape<R: Read>(reader: &mut R) -> Result<Ini, Error>
pub fn read_from_noescape<R: Read>(reader: &mut R) -> Result<Ini, Error>
Load from a reader, but do not interpret ’' as an escape character
Sourcepub fn read_from_opt<R: Read>(
reader: &mut R,
opt: ParseOption,
) -> Result<Ini, Error>
pub fn read_from_opt<R: Read>( reader: &mut R, opt: ParseOption, ) -> Result<Ini, Error>
Load from a reader with options
Sourcepub fn load_from_file_noescape<P: AsRef<Path>>(
filename: P,
) -> Result<Ini, Error>
pub fn load_from_file_noescape<P: AsRef<Path>>( filename: P, ) -> Result<Ini, Error>
Load from a file, but do not interpret ’' as an escape character
Sourcepub fn load_from_file_opt<P: AsRef<Path>>(
filename: P,
opt: ParseOption,
) -> Result<Ini, Error>
pub fn load_from_file_opt<P: AsRef<Path>>( filename: P, opt: ParseOption, ) -> Result<Ini, Error>
Load from a file with options
Source§impl<'a> Ini
impl<'a> Ini
Sourcepub fn iter(&'a self) -> SectionIterator<'a> ⓘ
pub fn iter(&'a self) -> SectionIterator<'a> ⓘ
Immutable iterate though sections
Sourcepub fn mut_iter(&'a mut self) -> SectionMutIterator<'a> ⓘ
pub fn mut_iter(&'a mut self) -> SectionMutIterator<'a> ⓘ
Mutable iterate though sections
Deprecated! Use iter_mut instead!
Sourcepub fn iter_mut(&'a mut self) -> SectionMutIterator<'a> ⓘ
pub fn iter_mut(&'a mut self) -> SectionMutIterator<'a> ⓘ
Mutable iterate though sections
Trait Implementations§
Source§impl<'a> IntoIterator for &'a Ini
impl<'a> IntoIterator for &'a Ini
Source§impl<'a> IntoIterator for &'a mut Ini
impl<'a> IntoIterator for &'a mut Ini
Source§impl IntoIterator for Ini
impl IntoIterator for Ini
Auto Trait Implementations§
impl Freeze for Ini
impl RefUnwindSafe for Ini
impl Send for Ini
impl Sync for Ini
impl Unpin for Ini
impl UnsafeUnpin 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