Skip to main content

render_fetch

Function render_fetch 

Source
pub fn render_fetch(
    out: &FetchOutput,
    format: OutputFormat,
    color: bool,
    ndjson_records: bool,
) -> String
Expand description

Render a FetchOutput in the given format. Owner: cli agent.

  • Json: serde_json::to_string_pretty(out).
  • Ndjson: one line per Item across all feeds; feed-level errors go to stderr (the caller handles that) — this function returns only the stdout payload. When ndjson_records is set, emit self-contained tagged records instead (see [render_fetch_ndjson_records]).
  • Text: a compact human summary; use color to decide on ANSI styling.