pub struct StandaloneConfig { /* private fields */ }Implementations§
Source§impl StandaloneConfig
impl StandaloneConfig
pub fn new(values: BTreeMap<String, String>) -> Self
pub fn empty() -> Self
pub fn read_at(path: &Path) -> Result<Option<Self>>
pub fn from_yaml_str(contents: &str) -> Result<Self>
pub fn write_at(&self, path: &Path) -> Result<()>
pub fn get(&self, key: &str) -> Option<&str>
pub fn set(&mut self, key: impl Into<String>, value: impl Into<String>)
pub fn remove(&mut self, key: &str)
pub fn values(&self) -> &BTreeMap<String, String>
Trait Implementations§
Source§impl Clone for StandaloneConfig
impl Clone for StandaloneConfig
Source§fn clone(&self) -> StandaloneConfig
fn clone(&self) -> StandaloneConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigSource for StandaloneConfig
impl ConfigSource for StandaloneConfig
Source§impl Debug for StandaloneConfig
impl Debug for StandaloneConfig
Source§impl Default for StandaloneConfig
impl Default for StandaloneConfig
Source§fn default() -> StandaloneConfig
fn default() -> StandaloneConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for StandaloneConfig
impl PartialEq for StandaloneConfig
Source§fn eq(&self, other: &StandaloneConfig) -> bool
fn eq(&self, other: &StandaloneConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for StandaloneConfig
impl StructuralPartialEq for StandaloneConfig
Auto Trait Implementations§
impl Freeze for StandaloneConfig
impl RefUnwindSafe for StandaloneConfig
impl Send for StandaloneConfig
impl Sync for StandaloneConfig
impl Unpin for StandaloneConfig
impl UnsafeUnpin for StandaloneConfig
impl UnwindSafe for StandaloneConfig
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.