Struct ini::ini::Ini [] [src]

pub struct Ini { /* fields omitted */ }

Ini struct

Methods

impl Ini
[src]

Create an instance

Set with a specified section, None is for the general section

Get the immmutable general section

Get the mutable general section

Get a immutable section

Get a mutable section

Get the entry

Clear all entries

Iterate with sections

Set key-value to a section

Get the value from a section with key

Example:

use ini::Ini;
let input = "[sec]\nabc = def\n";
let ini = Ini::load_from_str(input).unwrap();
assert_eq!(ini.get_from(Some("sec"), "abc"), Some("def"));

Get the value from a section with key, return the default value if it does not exist

Example:

use ini::Ini;
let input = "[sec]\n";
let ini = Ini::load_from_str(input).unwrap();
assert_eq!(ini.get_from_or(Some("sec"), "key", "default"), "default");

Get the mutable from a section with key

Delete a section, return the properties if it exists

impl Ini
[src]

Write to a file

Write to a file

Write to a writer

Write to a writer

impl Ini
[src]

Load from a string

Load from a reader

Load from a file

impl<'a> Ini
[src]

Immutable iterate though sections

Mutable iterate though sections Deprecated! Use iter_mut instead!

Mutable iterate though sections

Trait Implementations

impl Clone for Ini
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'q> Index<&'q Option<String>> for Ini
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'i> IndexMut<&'i Option<String>> for Ini
[src]

The method for the mutable indexing (container[index]) operation

impl<'q> Index<&'q str> for Ini
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'q> IndexMut<&'q str> for Ini
[src]

The method for the mutable indexing (container[index]) operation

impl<'a> IntoIterator for &'a Ini
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a> IntoIterator for &'a mut Ini
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl IntoIterator for Ini
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more