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
//! Sanctioned stdout writers for genuine command *results*.
//!
//! Everything alef emits splits into two channels:
//!
//! - **Diagnostics** — progress, status, warnings, errors — flow through `tracing`
//! (stderr, level-filtered by `-v`/`-q`/`RUST_LOG`). No production code path calls
//! `eprintln!`/`println!` directly; the `clippy::print_stdout`/`print_stderr` lints
//! forbid it crate-wide.
//! - **Results** — a command's deliverable that a user pipes or parses (JSON reports,
//! schema dumps, version listings, `diff` bodies) — go to stdout through this module.
//!
//! This module is the one place in the binary allowed to write to stdout, so the
//! result surface is auditable in a single file. Report-heavy commands with their own
//! stdout formatting (snippet tables, cache listings) instead carry a narrow
//! `#[allow(clippy::print_stdout)]` on the specific reporting function.
/// Write one line of command result output to stdout.
pub
/// Write a blank separator line to stdout.
pub
/// Write a pre-serialized result payload (e.g. JSON) to stdout, followed by a newline.
pub
/// Write a result fragment to stdout without appending a newline.
///
/// For output whose pieces already carry their own line terminators (e.g. a unified
/// diff whose lines each end in `\n`), so a trailing newline must not be added.
pub