Skip to main content

Crate datasynth_core

Crate datasynth_core 

Source
Expand description

§synth-core

Core domain models, traits, and distributions for synthetic accounting data generation.

This crate provides the foundational types used throughout the synthetic data factory:

  • Journal Entry models (header and line items)
  • Chart of Accounts structures
  • SAP HANA ACDOCA/BSEG compatible event log formats
  • Generator and Sink traits for extensibility
  • Statistical distribution samplers based on empirical research
  • Templates for realistic data generation (names, descriptions, references)
  • Resource management (memory, disk, CPU) with graceful degradation
  • Streaming infrastructure for real-time data generation

Re-exports§

pub use country::CountryCode;
pub use country::CountryPack;
pub use country::CountryPackError;
pub use country::CountryPackRegistry;
pub use cpu_monitor::CpuMonitor;
pub use cpu_monitor::CpuMonitorConfig;
pub use cpu_monitor::CpuOverloaded;
pub use cpu_monitor::CpuStats;
pub use degradation::DegradationActions;
pub use degradation::DegradationConfig;
pub use degradation::DegradationController;
pub use degradation::DegradationLevel;
pub use degradation::ResourceStatus;
pub use disk_guard::check_sufficient_disk_space;
pub use disk_guard::estimate_output_size_mb;
pub use disk_guard::get_available_space_mb;
pub use disk_guard::get_disk_space;
pub use disk_guard::DiskSpaceExhausted;
pub use disk_guard::DiskSpaceGuard;
pub use disk_guard::DiskSpaceGuardConfig;
pub use disk_guard::DiskStats;
pub use disk_guard::OutputFormat;
pub use error::SynthError;
pub use error::SynthResult;
pub use framework_accounts::AuditExportConfig;
pub use framework_accounts::FrameworkAccounts;
pub use memory_guard::check_sufficient_memory;
pub use memory_guard::estimate_memory_mb;
pub use memory_guard::get_memory_usage_mb;
pub use memory_guard::MemoryGuard;
pub use memory_guard::MemoryGuardConfig;
pub use memory_guard::MemoryLimitExceeded;
pub use memory_guard::MemoryStats;
pub use resource_guard::PreCheckResult;
pub use resource_guard::ResourceGuard;
pub use resource_guard::ResourceGuardBuilder;
pub use resource_guard::ResourceGuardConfig;
pub use resource_guard::ResourceStats;
pub use uuid_factory::DeterministicUuidFactory;
pub use uuid_factory::GeneratorType;
pub use uuid_factory::UuidFactoryRegistry;
pub use distributions::*;
pub use models::*;
pub use rate_limit::*;
pub use streaming::*;
pub use templates::*;
pub use traits::*;

Modules§

accounts
Centralized GL account constants for consistent account mapping.
causal
Causal and counterfactual data generation.
compliance
Regulatory compliance module for EU AI Act, GDPR, and related frameworks.
country
Pluggable country-pack architecture.
cpu_monitor
CPU load monitoring for preventing system overload.
degradation
Graceful degradation system for handling resource pressure.
diffusion
Diffusion model abstraction for statistical data generation.
disk_guard
Disk space management and guardrails for preventing disk exhaustion.
distributions
Statistical distribution samplers for realistic data generation.
error
Error types for the synthetic data generation system.
framework_accounts
Centralized framework-aware account mapping.
llm
LLM provider abstraction for AI-augmented data generation.
memory_guard
Memory management and guardrails for preventing OOM conditions.
models
Domain models for synthetic accounting data generation.
pcg
Plan Comptable Général (PCG) – French GAAP chart of accounts constants.
pcg_loader
Loader for the comprehensive Plan Comptable Général (PCG) 2024 structure.
plugins
Built-in plugin examples demonstrating the Plugin SDK.
rate_limit
Rate limiting for controlling generation throughput.
resource_guard
Unified resource guard combining memory, disk, and CPU monitoring.
skr
Standardkontenrahmen 04 (SKR04) – German GAAP (HGB) chart of accounts constants.
skr_loader
Loader for the SKR04 (Standardkontenrahmen 04) chart of accounts.
streaming
Streaming infrastructure for real-time data generation.
templates
Template system for realistic data generation.
traits
Core traits for generators, output sinks, post-processors, and plugins.
utils
Shared generator utilities.
uuid_factory
Deterministic UUID generation factory for reproducible synthetic data.