1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Effect-based output writers for debtmap analysis.
//!
//! This module provides Effect-wrapped output writers that enable testable,
//! composable output operations. All I/O is deferred until the effect is run.
//!
//! # Design Philosophy
//!
//! Following the Stillwater philosophy of "Pure Core, Imperative Shell":
//!
//! - **Pure Rendering** (`render`): Pure functions that transform data to strings
//! - **Effect Wrapping** (`writers`, `compose`, `report`): I/O operations wrapped in Effects
//! - **Composability**: Multiple outputs can be combined in a single pipeline
//! - **Testability**: All writers can be tested without file system access
//!
//! # Module Structure
//!
//! - `config`: Configuration types for output generation
//! - `render`: Pure rendering functions (no side effects)
//! - `writers`: Single-format effect writers
//! - `compose`: Multi-format composition utilities
//! - `report`: Complete report generation
//!
//! # Example
//!
//! ```rust,ignore
//! use debtmap::io::writers::effects::{write_markdown_effect, write_multi_format_effect};
//! use debtmap::effects::run_effect;
//! use debtmap::config::DebtmapConfig;
//!
//! // Write to markdown file
//! let effect = write_markdown_effect(results.clone(), "report.md".into());
//! run_effect(effect, DebtmapConfig::default())?;
//!
//! // Write to multiple formats at once
//! let config = OutputConfig::builder()
//! .markdown("report.md")
//! .json("report.json")
//! .build();
//! let effect = write_multi_format_effect(results, &config);
//! run_effect(effect, DebtmapConfig::default())?;
//! ```
// ============================================================================
// Public Re-exports
// ============================================================================
// Configuration types
pub use ;
// Pure rendering functions
pub use ;
// Single-format effect writers
pub use ;
// Composition utilities
pub use ;
// Report generation
pub use ;