Struct ini::Properties
source · [−]pub struct Properties { /* private fields */ }
Expand description
Properties type (key-value pairs)
Implementations
sourceimpl Properties
impl Properties
sourcepub fn new() -> Properties
pub fn new() -> Properties
Create an instance
sourcepub fn contains_key<S: AsRef<str>>(&self, s: S) -> bool
pub fn contains_key<S: AsRef<str>>(&self, s: S) -> bool
Return true if property exist
sourcepub fn insert<K, V>(&mut self, k: K, v: V) where
K: Into<String>,
V: Into<String>,
pub fn insert<K, V>(&mut self, k: K, v: V) where
K: Into<String>,
V: Into<String>,
Insert (key, value) pair by replace
sourcepub fn append<K, V>(&mut self, k: K, v: V) where
K: Into<String>,
V: Into<String>,
pub fn append<K, V>(&mut self, k: K, v: V) where
K: Into<String>,
V: Into<String>,
Append key with (key, value) pair
sourcepub fn get<S: AsRef<str>>(&self, s: S) -> Option<&str>
pub fn get<S: AsRef<str>>(&self, s: S) -> Option<&str>
Get the first value associate with the key
sourcepub fn get_all<S: AsRef<str>>(&self, s: S) -> impl Iterator<Item = &str>
pub fn get_all<S: AsRef<str>>(&self, s: S) -> impl Iterator<Item = &str>
Get all values associate with the key
Trait Implementations
sourceimpl Clone for Properties
impl Clone for Properties
sourcefn clone(&self) -> Properties
fn clone(&self) -> Properties
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Properties
impl Debug for Properties
sourceimpl Default for Properties
impl Default for Properties
sourcefn default() -> Properties
fn default() -> Properties
Returns the “default value” for a type. Read more
sourceimpl<S: AsRef<str>> Index<S> for Properties
impl<S: AsRef<str>> Index<S> for Properties
sourceimpl PartialEq<Properties> for Properties
impl PartialEq<Properties> for Properties
sourcefn eq(&self, other: &Properties) -> bool
fn eq(&self, other: &Properties) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Properties) -> bool
fn ne(&self, other: &Properties) -> bool
This method tests for !=
.
impl StructuralPartialEq for Properties
Auto Trait Implementations
impl RefUnwindSafe for Properties
impl Send for Properties
impl Sync for Properties
impl Unpin for Properties
impl UnwindSafe for Properties
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more