Expand description
§ggen-utils - Shared utilities for ggen project
This crate provides common utilities used across the ggen codebase, including:
- Error handling types and utilities
- Application configuration management
- Logging infrastructure
- Alert system for critical notifications
- Project configuration types
- Time utilities
- Type definitions and helpers
- User level management
§Examples
§Error Handling
use ggen_utils::error::Result;
use ggen_utils::error::Error;
fn process_data() -> Result<()> {
// Operations that may fail
Ok(())
}
process_data()?;§Configuration
use ggen_utils::app_config::AppConfig;
let config = AppConfig::load()?;
println!("Config loaded: {:?}", config);Re-exports§
pub use project_config::GgenConfig as UtilsGgenConfig;pub use project_config::Project;pub use project_config::RdfConfig;pub use error::Context;pub use error::Error;pub use error::Result;
Modules§
- alert
- Alert Helpers
- app_
config - Application configuration management
- cli
- CLI utility functions for ggen command-line interface
- enhanced_
error - Enhanced error handling with contextual help and platform-specific fixes
- error
- Error handling types and utilities
- fmea
- FMEA (Failure Mode and Effects Analysis) framework for systematic failure tracking.
- logger
- Structured logging infrastructure
- project_
config - Project configuration types
- time
- Time utilities for ggen
- types
- Common type definitions for ggen
- user_
level - User experience level tracking for progressive help
- versioning
Macros§
- alert
- Emit an alert with custom severity
- alert_
critical - Emit a critical alert (🚨)
- alert_
debug - Emit a debug alert (🔍)
- alert_
info - Emit an info alert (ℹ️)
- alert_
success - Emit a success alert (✅)
- alert_
warning - Emit a warning alert (⚠️)
- bail
- Return early with an error
- breaking_
change - Marks a breaking change with migration path
- deprecated_
since - Deprecation macro with version tracking and migration notes
- ensure
- Ensure a condition is true, or return early with an error
- experimental
- Marks a feature as experimental with version tracking
- fmea_
track - Macro for concise FMEA tracking with automatic error propagation.