Skip to main content

solana_tools_lite_cli/flows/presenter/
presenter_trait.rs

1//! Trait for presenting flow results to stdout/stderr.
2
3/// Presentable: implement to control how a result is shown.
4/// - `json`: pretty JSON when true, otherwise plain text
5/// - `show_secret`: allow printing secrets when applicable (may be ignored)
6/// - `to_stderr`: emit output to stderr instead of stdout
7pub trait Presentable {
8    fn present(
9        &self,
10        json: bool,
11        show_secret: bool,
12        to_stderr: bool,
13    ) -> Result<(), crate::shell::error::CliError>;
14}