solana_cli_output/
lib.rs

1#![cfg_attr(
2    not(feature = "agave-unstable-api"),
3    deprecated(
4        since = "3.1.0",
5        note = "This crate has been marked for formal inclusion in the Agave Unstable API. From \
6                v4.0.0 onward, the `agave-unstable-api` crate feature must be specified to \
7                acknowledge use of an interface that may break without warning."
8    )
9)]
10#![allow(clippy::arithmetic_side_effects)]
11mod cli_output;
12pub mod cli_version;
13pub mod display;
14pub use cli_output::*;
15
16pub trait QuietDisplay: std::fmt::Display {
17    fn write_str(&self, w: &mut dyn std::fmt::Write) -> std::fmt::Result {
18        write!(w, "{self}")
19    }
20}
21
22pub trait VerboseDisplay: std::fmt::Display {
23    fn write_str(&self, w: &mut dyn std::fmt::Write) -> std::fmt::Result {
24        write!(w, "{self}")
25    }
26}