Skip to main content

Module output

Module output 

Source
Expand description

The output::Output trait and its standard implementations. The Output trait and its standard implementations.

§Overview

  • OutputMode — a plain Copy struct that carries the three common CLI flags (verbose, quiet, dry_run).
  • Output — the core trait; implement it to redirect output anywhere.
  • ConsoleOutput — the production implementation; respects quiet / verbose and writes to stdout.
  • StringOutput — an in-memory implementation for use in tests; captures all output in a String that can be inspected with StringOutput::log.

Structs§

ConsoleOutput
Production Output implementation that writes to stdout.
OutputMode
Carries the three standard CLI output-mode flags.
StringOutput
In-memory Output implementation for use in tests.

Traits§

Output
Abstraction over console output, enabling tests to capture output in memory.