pub struct JsonSettings { /* private fields */ }
Expand description
core
Implementations§
Source§impl JsonSettings
impl JsonSettings
Sourcepub fn new(filepath: &PathBuf) -> JsonSettings
pub fn new(filepath: &PathBuf) -> JsonSettings
create instance
Sourcepub fn exe_dir() -> JsonSettings
pub fn exe_dir() -> JsonSettings
create instance to manage file in executable dir
Sourcepub fn exe_dir_with_filename(filename: &str) -> JsonSettings
pub fn exe_dir_with_filename(filename: &str) -> JsonSettings
create instance to manage file in executable dir
Sourcepub fn config_dir() -> JsonSettings
pub fn config_dir() -> JsonSettings
create instance to manage file in user config dir
Sourcepub fn config_dir_with_filename(filename: &str) -> JsonSettings
pub fn config_dir_with_filename(filename: &str) -> JsonSettings
create instance to manage file in user config dir
Sourcepub fn read_by_key(&self, key: &str) -> Result<KeyValue, Box<dyn Error>>
pub fn read_by_key(&self, key: &str) -> Result<KeyValue, Box<dyn Error>>
get value from key if exists
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JsonSettings
impl<'de> Deserialize<'de> for JsonSettings
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
Auto Trait Implementations§
impl Freeze for JsonSettings
impl RefUnwindSafe for JsonSettings
impl Send for JsonSettings
impl Sync for JsonSettings
impl Unpin for JsonSettings
impl UnwindSafe for JsonSettings
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