Struct culper_lib::config::ConfigReader
source · pub struct ConfigReader {
pub path: PathBuf,
pub config: Option<CulperConfig>,
}
Fields
path: PathBuf
config: Option<CulperConfig>
Implementations
sourceimpl 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
sourceimpl Clone for ConfigReader
impl Clone for ConfigReader
sourcefn clone(&self) -> ConfigReader
fn clone(&self) -> ConfigReader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for ConfigReader
impl Send for ConfigReader
impl Sync for ConfigReader
impl Unpin for ConfigReader
impl UnwindSafe for ConfigReader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more