ggen_utils/
lib.rs

1//! # ggen-utils - Shared utilities for ggen project
2//!
3//! This crate provides common utilities used across the ggen codebase, including:
4//! - Error handling types and utilities
5//! - Application configuration management
6//! - Logging infrastructure
7//! - Alert system for critical notifications
8//! - Project configuration types
9//! - Time utilities
10//! - Type definitions and helpers
11//! - User level management
12//!
13//! ## Examples
14//!
15//! ### Error Handling
16//!
17//! ```rust,no_run
18//! use ggen_utils::error::Result;
19//! use ggen_utils::error::Error;
20//!
21//! fn process_data() -> Result<()> {
22//!     // Operations that may fail
23//!     Ok(())
24//! }
25//!
26//! # fn main() -> Result<()> {
27//! process_data()?;
28//! # Ok(())
29//! # }
30//! ```
31//!
32//! ### Configuration
33//!
34//! ```rust,no_run
35//! use ggen_utils::app_config::AppConfig;
36//!
37//! let config = AppConfig::load()?;
38//! println!("Config loaded: {:?}", config);
39//! # Ok::<(), Box<dyn std::error::Error>>(())
40//! ```
41
42// backtrace is stable since 1.65.0, no feature flag needed
43
44#![deny(warnings)] // Poka-Yoke: Prevent warnings at compile time - compiler enforces correctness
45
46pub mod alert;
47pub mod app_config;
48pub mod cli;
49pub mod enhanced_error;
50pub mod error;
51pub mod fmea;
52pub mod logger;
53pub mod project_config;
54pub mod time;
55pub mod types;
56pub mod user_level;
57pub mod versioning;
58
59pub use project_config::{GgenConfig as UtilsGgenConfig, Project, RdfConfig};
60
61// Re-export error handling utilities
62// Note: bail! and ensure! macros are exported via #[macro_export] in error.rs
63// They are available as ggen_utils::bail! and ggen_utils::ensure!
64pub use error::{Context, Error, Result};