pub struct Settings(/* private fields */);Expand description
Represents a case-insensitive collection of configuration settings.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn keys(&self) -> Keys<'_>
pub fn keys(&self) -> Keys<'_>
Gets an iterator over the keys in the collection in an arbitrary order.
Sourcepub fn get(&self, key: &str) -> Option<&str>
pub fn get(&self, key: &str) -> Option<&str>
Gets the setting with the specified key.
§Arguments
key- The case-insensitive key of the setting to retrieve
Sourcepub fn insert(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
) -> Option<String>
pub fn insert( &mut self, key: impl Into<String>, value: impl Into<String>, ) -> Option<String>
Adds or updates a setting with the specified key and value.
§Arguments
key- The key of the setting to add or updatevalue- The value of the setting to add or update
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the settings as much as possible. It will drop down as much as possible while maintaining the internal rules and possibly leaving some space in accordance with the resize policy.
Trait Implementations§
Source§impl<'a> IntoIterator for &'a Settings
impl<'a> IntoIterator for &'a Settings
Source§impl IntoIterator for Settings
impl IntoIterator for Settings
Source§impl Merge<Configuration> for Settings
impl Merge<Configuration> for Settings
Source§fn merge(&mut self, other: &Configuration)
fn merge(&mut self, other: &Configuration)
Merges an object into current object. Read more
Source§impl Merge<Settings> for Configuration
impl Merge<Settings> for Configuration
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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