pub struct ConfigReader {
pub path: PathBuf,
pub config: Option<CulperConfig>,
}Fields§
§path: PathBuf§config: Option<CulperConfig>Implementations§
Source§impl ConfigReader
impl ConfigReader
pub fn new(raw_config_path: Option<&str>) -> ConfigReader
pub fn read(&mut self) -> Result<CulperConfig, Error>
pub fn add_target(&mut self, host: &str, id: &str) -> Result<(), Error>
pub fn update(&mut self, new_config: CulperConfig) -> &mut Self
pub fn write(&self) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for ConfigReader
impl Clone for ConfigReader
Source§fn clone(&self) -> ConfigReader
fn clone(&self) -> ConfigReader
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ConfigReader
impl RefUnwindSafe for ConfigReader
impl Send for ConfigReader
impl Sync for ConfigReader
impl Unpin for ConfigReader
impl UnwindSafe for ConfigReader
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