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
//! Error types for the `report` module.
use Error;
/// Errors produced by report aggregation and formatting.
///
/// Why: report generation can fail at the DB read, CSV/JSON serialise,
/// Tera template, or filesystem write phases; one uniform error keeps the
/// formatter signatures simple.
/// What: `thiserror` enum with `From` impls for `csv::Error`, JSON,
/// `tera::Error`, `std::io::Error`, and core errors.
/// Test: covered indirectly via the formatter tests in `report::tests`.
/// Module-wide `Result` alias.
///
/// Why: keeps signatures compact across all formatter functions.
/// What: alias for `std::result::Result<T, ReportError>`.
/// Test: exercised by every fallible function in `report`.
pub type Result<T> = Result;