pub struct DataprofConfig {
pub output: OutputConfig,
pub quality: QualityConfig,
pub engine: EngineConfig,
}Expand description
Main configuration structure for dataprof.
Fields§
§output: OutputConfigOutput configuration
quality: QualityConfigQuality checking configuration
engine: EngineConfigEngine selection and performance tuning
Implementations§
Source§impl DataprofConfig
impl DataprofConfig
Sourcepub fn load_from_file<P: AsRef<Path>>(
path: P,
) -> Result<Self, DataProfilerError>
pub fn load_from_file<P: AsRef<Path>>( path: P, ) -> Result<Self, DataProfilerError>
Load configuration from file, with fallback to default
Sourcepub fn save_to_file<P: AsRef<Path>>(
&self,
path: P,
) -> Result<(), DataProfilerError>
pub fn save_to_file<P: AsRef<Path>>( &self, path: P, ) -> Result<(), DataProfilerError>
Save configuration to file
Sourcepub fn load_with_discovery() -> Self
pub fn load_with_discovery() -> Self
Load configuration with automatic file discovery.
Searches for configuration files in the following order:
.dataprof.tomlin current directory$HOME/.config/dataprof/config.toml(Linux/macOS)%USERPROFILE%\.config\dataprof\config.toml(Windows)dataprof.tomlin current directory
If no config file is found, returns default configuration with environment variable overrides applied.
Sourcepub fn apply_env_overrides(&mut self)
pub fn apply_env_overrides(&mut self)
Apply environment variable overrides
Sourcepub fn apply_overrides(
&mut self,
format: Option<&str>,
quality: Option<bool>,
progress: Option<bool>,
)
pub fn apply_overrides( &mut self, format: Option<&str>, quality: Option<bool>, progress: Option<bool>, )
Apply explicit runtime overrides to configuration.
Sourcepub fn merge_with_cli_args(
&mut self,
format: Option<&str>,
quality: Option<bool>,
progress: Option<bool>,
)
👎Deprecated: use DataprofConfig::apply_overrides instead
pub fn merge_with_cli_args( &mut self, format: Option<&str>, quality: Option<bool>, progress: Option<bool>, )
use DataprofConfig::apply_overrides instead
Deprecated compatibility wrapper for the old CLI-oriented name.
Sourcepub fn create_sample_config<P: AsRef<Path>>(
path: P,
) -> Result<(), DataProfilerError>
pub fn create_sample_config<P: AsRef<Path>>( path: P, ) -> Result<(), DataProfilerError>
Create a sample configuration file for users
Source§impl DataprofConfig
Configuration validation with comprehensive error messages
impl DataprofConfig
Configuration validation with comprehensive error messages
Sourcepub fn validate(&self) -> Result<(), DataProfilerError>
pub fn validate(&self) -> Result<(), DataProfilerError>
Validate the configuration and return detailed error messages.
This method checks:
- Output format validity
- Verbosity level range
- Quality threshold ranges
- ISO threshold consistency
- Engine validity
- Memory configuration sanity
- Chunk size validity
Trait Implementations§
Source§impl Clone for DataprofConfig
impl Clone for DataprofConfig
Source§fn clone(&self) -> DataprofConfig
fn clone(&self) -> DataprofConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more