gitql_cli/printer/
mod.rs

1use gitql_core::object::GitQLObject;
2
3/// Represent the different type of available formats
4#[derive(Debug, PartialEq)]
5pub enum OutputFormatKind {
6    /// Render the output as table
7    Table,
8    /// Print the output in JSON format
9    JSON,
10    /// Print the output in CSV format
11    CSV,
12    /// Print the output in YAML format
13    YAML,
14}
15
16pub trait BaseOutputPrinter {
17    fn print(&self, object: &mut GitQLObject);
18}
19
20mod csv_printer;
21pub use csv_printer::CSVPrinter;
22
23mod json_printer;
24pub use json_printer::JSONPrinter;
25
26mod table_printer;
27pub use table_printer::TablePrinter;
28
29mod yaml_printer;
30pub use yaml_printer::YAMLPrinter;