Skip to main content

datasynth_core/
lib.rs

1#![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 compliance;
20pub mod country;
21pub mod cpu_monitor;
22pub mod degradation;
23pub mod diffusion;
24pub mod disk_guard;
25pub mod distributions;
26pub mod error;
27pub mod framework_accounts;
28pub mod llm;
29pub mod memory_guard;
30pub mod models;
31pub mod pcg;
32pub mod pcg_loader;
33pub mod plugins;
34pub mod rate_limit;
35pub mod resource_guard;
36pub mod serde_decimal;
37pub mod serde_timestamp;
38pub mod skr;
39pub mod skr_loader;
40pub mod streaming;
41pub mod templates;
42pub mod traits;
43pub mod utils;
44pub mod uuid_factory;
45
46// -- Explicit re-exports for commonly used infrastructure types --
47
48pub use country::{CountryCode, CountryPack, CountryPackError, CountryPackRegistry};
49
50pub use cpu_monitor::{CpuMonitor, CpuMonitorConfig, CpuOverloaded, CpuStats};
51
52pub use degradation::{
53    DegradationActions, DegradationConfig, DegradationController, DegradationLevel, ResourceStatus,
54};
55
56pub use disk_guard::{
57    check_sufficient_disk_space, estimate_output_size_mb, get_available_space_mb, get_disk_space,
58    DiskSpaceExhausted, DiskSpaceGuard, DiskSpaceGuardConfig, DiskStats, OutputFormat,
59};
60
61pub use error::{SynthError, SynthResult};
62
63pub use framework_accounts::{AuditExportConfig, FrameworkAccounts};
64
65pub use memory_guard::{
66    check_sufficient_memory, estimate_memory_mb, get_memory_usage_mb, MemoryGuard,
67    MemoryGuardConfig, MemoryLimitExceeded, MemoryStats,
68};
69
70pub use resource_guard::{
71    PreCheckResult, ResourceGuard, ResourceGuardBuilder, ResourceGuardConfig, ResourceStats,
72};
73
74pub use uuid_factory::{DeterministicUuidFactory, GeneratorType, UuidFactoryRegistry};
75
76// -- Glob re-exports for large, widely-consumed modules --
77// These modules expose many types that are used broadly across the workspace.
78// Converting them to explicit re-exports would be high-risk with limited benefit.
79
80pub use distributions::*;
81pub use models::*;
82pub use rate_limit::*;
83pub use streaming::*;
84pub use templates::*;
85pub use traits::*;