Struct ini::Properties[][src]

pub struct Properties { /* fields omitted */ }

Properties type (key-value pairs)

Implementations

impl Properties[src]

pub fn new() -> Properties[src]

Create an instance

pub fn len(&self) -> usize[src]

Get the number of the properties

pub fn is_empty(&self) -> bool[src]

Check if properties has 0 elements

pub fn iter(&self) -> impl Iterator<Item = (&str, &str)>[src]

Get an iterator of the properties

pub fn contains_key<S: AsRef<str>>(&self, s: S) -> bool[src]

Return true if property exist

pub fn insert<K, V>(&mut self, k: K, v: V) where
    K: Into<String>,
    V: Into<String>, 
[src]

Insert (key, value) pair by replace

pub fn append<K, V>(&mut self, k: K, v: V) where
    K: Into<String>,
    V: Into<String>, 
[src]

Append key with (key, value) pair

pub fn get<S: AsRef<str>>(&self, s: S) -> Option<&str>[src]

Get the first value associate with the key

pub fn get_all<S: AsRef<str>>(&self, s: S) -> impl Iterator<Item = &str>[src]

Get all values associate with the key

pub fn remove<S: AsRef<str>>(&mut self, s: S) -> Option<String>[src]

Remove the property with the first value of the key

pub fn remove_all<'a, S: AsRef<str>>(
    &'a mut self,
    s: S
) -> impl Iterator<Item = String> + 'a
[src]

Remove the property with all values with the same key

Trait Implementations

impl Clone for Properties[src]

impl Debug for Properties[src]

impl Default for Properties[src]

impl<S: AsRef<str>> Index<S> for Properties[src]

type Output = str

The returned type after indexing.

impl PartialEq<Properties> for Properties[src]

impl StructuralPartialEq for Properties[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,