pub struct DataprofConfig {
pub output: OutputConfig,
pub quality: QualityConfig,
pub engine: EngineConfig,
pub database: Option<DatabaseSettings>,
}Expand description
Main configuration structure for dataprof.
Fields§
§output: OutputConfigOutput configuration
quality: QualityConfigQuality checking configuration
engine: EngineConfigEngine selection and performance tuning
database: Option<DatabaseSettings>Database configuration
Implementations§
Source§impl DataprofConfig
impl DataprofConfig
Sourcepub fn load_from_file<P>(path: P) -> Result<DataprofConfig, DataProfilerError>
pub fn load_from_file<P>(path: P) -> Result<DataprofConfig, DataProfilerError>
Load configuration from file, with fallback to default
Sourcepub fn save_to_file<P>(&self, path: P) -> Result<(), DataProfilerError>
pub fn save_to_file<P>(&self, path: P) -> Result<(), DataProfilerError>
Save configuration to file
Sourcepub fn load_with_discovery() -> DataprofConfig
pub fn load_with_discovery() -> DataprofConfig
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>(path: P) -> Result<(), DataProfilerError>
pub fn create_sample_config<P>(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 moreSource§impl Debug for DataprofConfig
impl Debug for DataprofConfig
Source§impl Default for DataprofConfig
impl Default for DataprofConfig
Source§fn default() -> DataprofConfig
fn default() -> DataprofConfig
Source§impl<'de> Deserialize<'de> for DataprofConfig
impl<'de> Deserialize<'de> for DataprofConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DataprofConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DataprofConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for DataprofConfig
impl Serialize for DataprofConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for DataprofConfig
impl RefUnwindSafe for DataprofConfig
impl Send for DataprofConfig
impl Sync for DataprofConfig
impl Unpin for DataprofConfig
impl UnsafeUnpin for DataprofConfig
impl UnwindSafe for DataprofConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more