Expand description
The output::Output trait and its standard implementations.
The Output trait and its standard implementations.
§Overview
OutputMode— a plainCopystruct 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; respectsquiet/verboseand writes to stdout.StringOutput— an in-memory implementation for use in tests; captures all output in aStringthat can be inspected withStringOutput::log.
Structs§
- Console
Output - Production
Outputimplementation that writes to stdout. - Output
Mode - Carries the three standard CLI output-mode flags.
- String
Output - In-memory
Outputimplementation for use in tests.
Traits§
- Output
- Abstraction over console output, enabling tests to capture output in memory.