Skip to main content

DataprofConfigBuilder

Struct DataprofConfigBuilder 

Source
pub struct DataprofConfigBuilder { /* private fields */ }
Expand description

Builder for constructing DataprofConfig with a fluent API.

The builder pattern provides:

  • Clear, self-documenting configuration
  • Type-safe construction
  • Validation at build time
  • Easy preset configurations

§Examples

use dataprof::core::config::{DataprofConfigBuilder, IsoQualityConfig};

// Simple configuration with defaults
let config = DataprofConfigBuilder::new()
    .build()
    .expect("Failed to build config");

// Configuration with custom settings
let config = DataprofConfigBuilder::new()
    .output_format("json")
    .verbosity(2)
    .engine("streaming")
    .build()
    .expect("Failed to build config");

// Strict quality profile for finance/healthcare
let config = DataprofConfigBuilder::new()
    .iso_quality_profile_strict()
    .build()
    .expect("Failed to build config");

Implementations§

Source§

impl DataprofConfigBuilder

Source

pub fn new() -> Self

Create a new builder with default values.

Source

pub fn output_format(self, format: &str) -> Self

Set the default output format.

Valid formats: “text”, “json”, “csv”, “plain”

Source

pub fn colored(self, enabled: bool) -> Self

Enable or disable colored output.

Source

pub fn verbosity(self, level: u8) -> Self

Set verbosity level (0=quiet, 1=normal, 2=verbose, 3=debug).

Source

pub fn show_progress(self, enabled: bool) -> Self

Enable or disable progress bars.

Source

pub fn html_auto_generate(self, enabled: bool) -> Self

Enable HTML report auto-generation.

Source

pub fn html_output_dir(self, dir: PathBuf) -> Self

Set HTML report output directory.

Source

pub fn quality_enabled(self, enabled: bool) -> Self

Enable or disable quality checking.

When enabled, all ISO 8000/25012 quality metrics are calculated:

  • Completeness (null detection)
  • Consistency (type consistency, mixed types)
  • Uniqueness (duplicate detection, high cardinality)
  • Accuracy (outlier detection)
  • Timeliness (stale data detection)
Source

pub fn iso_quality_thresholds(self, thresholds: IsoQualityConfig) -> Self

Set custom ISO quality thresholds.

Source

pub fn iso_quality_profile_strict(self) -> Self

Use strict ISO quality thresholds (finance, healthcare).

Stricter thresholds for high-compliance industries:

  • Lower null tolerance (30% vs 50%)
  • Higher type consistency requirements (98% vs 95%)
  • Stricter duplicate detection (1% vs 5%)
  • More recent data requirements (2 years vs 5 years)
Source

pub fn iso_quality_profile_lenient(self) -> Self

Use lenient ISO quality thresholds (exploratory, marketing).

More relaxed thresholds for exploratory data:

  • Higher null tolerance (70% vs 50%)
  • Lower type consistency requirements (90% vs 95%)
  • More lenient duplicate detection (10% vs 5%)
  • Older data accepted (10 years vs 5 years)
Source

pub fn engine(self, engine: &str) -> Self

Set the default engine selection.

Valid engines: “auto”, “streaming”, “memory_efficient”, “true_streaming”

Source

pub fn chunk_size(self, size: usize) -> Self

Set default chunk size for streaming operations.

Source

pub fn parallel(self, enabled: bool) -> Self

Enable or disable parallel processing.

Source

pub fn max_concurrent(self, max: usize) -> Self

Set maximum concurrent operations.

Source

pub fn max_memory_mb(self, mb: usize) -> Self

Set maximum memory usage in MB (0 = unlimited).

Source

pub fn auto_streaming_threshold_mb(self, mb: f64) -> Self

Set auto-streaming threshold in MB.

Source

pub fn db_connection_timeout(self, seconds: u64) -> Self

Set database connection timeout in seconds.

Source

pub fn db_batch_size(self, size: usize) -> Self

Set database batch size for queries.

Source

pub fn db_sampling_enabled(self, enabled: bool) -> Self

Enable or disable database sampling.

Source

pub fn ci_preset() -> Self

Create a configuration optimized for CI/CD pipelines.

  • No colors (for log compatibility)
  • No progress bars (cleaner output)
  • JSON output format
  • Verbose logging
Source

pub fn interactive_preset() -> Self

Create a configuration for interactive terminal use.

  • Colors enabled
  • Progress bars enabled
  • Text output format
  • Normal verbosity
Source

pub fn production_quality_preset() -> Self

Create a configuration for production quality checks.

  • Strict ISO quality thresholds
  • Quality checking enabled
  • Memory monitoring enabled
  • Conservative memory limits
Source

pub fn build(self) -> Result<DataprofConfig>

Build the configuration and validate it.

Returns an error if the configuration is invalid.

Source

pub fn build_unchecked(self) -> DataprofConfig

Build the configuration without validation.

Use this only if you’re certain the configuration is valid and want to skip validation for performance reasons.

Trait Implementations§

Source§

impl Clone for DataprofConfigBuilder

Source§

fn clone(&self) -> DataprofConfigBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DataprofConfigBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DataprofConfigBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Ungil for T
where T: Send,