pub struct Properties { /* private fields */ }
Expand description
Properties type (key-value pairs)
Implementations§
source§impl Properties
impl Properties
sourcepub fn new() -> Properties
pub fn new() -> Properties
Create an instance
sourcepub fn iter(&self) -> impl DoubleEndedIterator<Item = (&str, &str)>
pub fn iter(&self) -> impl DoubleEndedIterator<Item = (&str, &str)>
Get an iterator of the properties
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 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 DoubleEndedIterator<Item = &str>
pub fn get_all<S: AsRef<str>>( &self, s: S, ) -> impl DoubleEndedIterator<Item = &str>
Get all values associate with the key
sourcepub fn remove<S: AsRef<str>>(&mut self, s: S) -> Option<String>
pub fn remove<S: AsRef<str>>(&mut self, s: S) -> Option<String>
Remove the property with the first value of the key
sourcepub fn remove_all<S: AsRef<str>>(
&mut self,
s: S,
) -> impl DoubleEndedIterator<Item = String> + '_
pub fn remove_all<S: AsRef<str>>( &mut self, s: S, ) -> impl DoubleEndedIterator<Item = String> + '_
Remove the property with all values with the same key
Trait Implementations§
source§impl Clone for Properties
impl Clone for Properties
source§fn clone(&self) -> Properties
fn clone(&self) -> Properties
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Properties
impl Debug for Properties
source§impl Default for Properties
impl Default for Properties
source§fn default() -> Properties
fn default() -> Properties
Returns the “default value” for a type. Read more
source§impl PartialEq for Properties
impl PartialEq for Properties
impl StructuralPartialEq for Properties
Auto Trait Implementations§
impl Freeze for Properties
impl RefUnwindSafe for Properties
impl Send for Properties
impl Sync for Properties
impl Unpin for Properties
impl UnwindSafe for Properties
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)