pub struct Config {
pub sources: SourceConfig,
pub data_path: PathBuf,
pub paused: bool,
}Expand description
Main configuration for the sensor agent.
Fields§
§sources: SourceConfigWhich input sources to capture.
data_path: PathBufPath for storing state and transparency logs.
paused: boolWhether collection is currently paused.
Implementations§
Source§impl Config
impl Config
Sourcepub fn load() -> Result<Self, ConfigError>
pub fn load() -> Result<Self, ConfigError>
Load configuration from the default location.
Sourcepub fn save(&self) -> Result<(), ConfigError>
pub fn save(&self) -> Result<(), ConfigError>
Save configuration to the default location.
Sourcepub fn config_path() -> PathBuf
pub fn config_path() -> PathBuf
Get the path to the configuration file.
Sourcepub fn ensure_directories(&self) -> Result<(), ConfigError>
pub fn ensure_directories(&self) -> Result<(), ConfigError>
Ensure all required directories exist.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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