1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Column-level validators.
//!
//! This module declares and re-exports all individual column validators.
//! Each validator implements the `Validator` trait defined in
//! `validators.rs`, and enforces a specific rule on a single column
//! of a Polars `DataFrame`.
//!
//! The engine (`engine/validation.rs`) imports these re-exports and
//! dispatches to them based on the `ContractType` enum.
//!
//! ## Adding a new column validator
//! 1. Create a new module file in this directory (e.g. `my_rule.rs`).
//! 2. Implement the `Validator` trait for your struct.
//! 3. Add a `pub mod my_rule;` declaration here.
//! 4. Add a `pub use my_rule::MyRuleValidator;` re-export here.
//! 5. Add a new `ContractType::MyRule` variant in `contracts/types.rs`.
//! 6. Wire it into the `match` in `engine/validation.rs`.
//!
//! This keeps the system modular and contributor-friendly.
// -----------------------------------------------------------------------------
// Declare all individual column validator modules
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Re-export each validator struct for easy access from the engine
// -----------------------------------------------------------------------------
pub use BooleanValidator;
pub use CompletenessValidator;
pub use DateFormatValidator;
pub use DistinctnessValidator;
pub use InSetValidator;
pub use MaxLengthValidator;
pub use MeanBetweenValidator;
pub use NotInSetValidator;
pub use NotNullValidator;
pub use OutlierSigmaValidator;
pub use PatternValidator;
pub use RangeValidator;
pub use StdevBetweenValidator;
pub use TypeValidator;
pub use UniqueValidator;