Skip to main content

datasynth_core/
lib.rs

1#![cfg_attr(not(test), deny(clippy::unwrap_used))]
2
3//! # synth-core
4//!
5//! Core domain models, traits, and distributions for synthetic accounting data generation.
6//!
7//! This crate provides the foundational types used throughout the synthetic data factory:
8//! - Journal Entry models (header and line items)
9//! - Chart of Accounts structures
10//! - SAP HANA ACDOCA/BSEG compatible event log formats
11//! - Generator and Sink traits for extensibility
12//! - Statistical distribution samplers based on empirical research
13//! - Templates for realistic data generation (names, descriptions, references)
14//! - Resource management (memory, disk, CPU) with graceful degradation
15//! - Streaming infrastructure for real-time data generation
16
17pub mod accounts;
18pub mod causal;
19pub mod clock;
20pub mod compliance;
21pub mod country;
22pub mod cpu_monitor;
23pub mod degradation;
24pub mod diffusion;
25pub mod disk_guard;
26pub mod distributions;
27pub mod error;
28pub mod framework_accounts;
29pub mod fraud_bias;
30pub mod fraud_propagation;
31pub mod industry_packs;
32pub mod iso21378;
33pub mod llm;
34pub mod memory_guard;
35pub mod models;
36pub mod pcg;
37pub mod pcg_loader;
38pub mod plugins;
39pub mod rate_limit;
40pub mod resource_guard;
41pub mod serde_decimal;
42pub mod serde_timestamp;
43pub mod skr;
44pub mod skr_loader;
45pub mod streaming;
46pub mod templates;
47pub mod traits;
48pub mod utils;
49pub mod uuid_factory;
50
51// -- Explicit re-exports for commonly used infrastructure types --
52
53pub use country::{CountryCode, CountryPack, CountryPackError, CountryPackRegistry};
54
55pub use cpu_monitor::{CpuMonitor, CpuMonitorConfig, CpuOverloaded, CpuStats};
56
57pub use degradation::{
58    DegradationActions, DegradationConfig, DegradationController, DegradationLevel, ResourceStatus,
59};
60
61pub use disk_guard::{
62    check_sufficient_disk_space, estimate_output_size_mb, get_available_space_mb, get_disk_space,
63    DiskSpaceExhausted, DiskSpaceGuard, DiskSpaceGuardConfig, DiskStats, OutputFormat,
64};
65
66pub use error::{SynthError, SynthResult};
67
68pub use framework_accounts::{AuditExportConfig, FrameworkAccounts};
69
70pub use memory_guard::{
71    check_sufficient_memory, estimate_memory_mb, get_memory_usage_mb, MemoryGuard,
72    MemoryGuardConfig, MemoryLimitExceeded, MemoryStats,
73};
74
75pub use resource_guard::{
76    PreCheckResult, ResourceGuard, ResourceGuardBuilder, ResourceGuardConfig, ResourceStats,
77};
78
79pub use uuid_factory::{DeterministicUuidFactory, GeneratorType, UuidFactoryRegistry};
80
81// -- Glob re-exports for large, widely-consumed modules --
82// These modules expose many types that are used broadly across the workspace.
83// Converting them to explicit re-exports would be high-risk with limited benefit.
84
85pub use distributions::*;
86pub use models::*;
87pub use rate_limit::*;
88pub use streaming::*;
89pub use templates::*;
90pub use traits::*;