pub struct Settings {
pub client: Client,
pub daemon: Daemon,
pub shared: Shared,
pub profiles: HashMap<String, NestedSettings>,
}Expand description
The parent settings struct.
This contains all other setting structs.
Fields§
§client: Client§daemon: Daemon§profiles: HashMap<String, NestedSettings>Implementations§
source§impl Settings
impl Settings
sourcepub fn read(from_file: &Option<PathBuf>) -> Result<(Settings, bool), Error>
pub fn read(from_file: &Option<PathBuf>) -> Result<(Settings, bool), Error>
Try to read existing config files, while using default values for non-existing fields. If successful, this will return a full config as well as a boolean on whether we found an existing configuration file or not.
The default local config locations depends on the current target.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Settings> for Settings
impl PartialEq<Settings> for Settings
impl Eq for Settings
impl StructuralEq for Settings
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin 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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.