aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-symfony-console/src/style/style_interface.rs
blob: 8ac8b49f5380664b786bcbdf81eafbbb3eb70a42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! ref: composer/vendor/symfony/console/Style/StyleInterface.php

use crate::helper::Cell;
use crate::helper::Row;

/// Output style helpers.
pub trait StyleInterface {
    /// Formats an error result bar.
    fn error(&mut self, message: &[String]);

    /// Formats a table.
    fn table(&mut self, headers: Vec<Cell>, rows: Vec<Row>);

    /// Asks for confirmation.
    fn confirm(&mut self, question: &str, default: bool) -> bool;

    /// Add newline(s).
    fn new_line(&mut self, count: i64);
}