diff options
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/formatter')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter.rs | 41 | ||||
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_interface.rs | 5 |
2 files changed, 46 insertions, 0 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter.rs b/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter.rs index 4b499b8..f64361e 100644 --- a/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter.rs +++ b/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter.rs @@ -39,4 +39,45 @@ impl OutputFormatter { ) { todo!() } + + pub fn has_style(&self, _name: &str) -> bool { + todo!() + } + + pub fn get_style( + &self, + _name: &str, + ) -> crate::symfony::console::formatter::OutputFormatterStyle { + todo!() + } +} + +impl crate::symfony::console::formatter::OutputFormatterInterface for OutputFormatter { + fn is_decorated(&self) -> bool { + self.is_decorated() + } + + fn set_decorated(&mut self, decorated: bool) { + self.set_decorated(decorated) + } + + fn set_style( + &mut self, + name: &str, + style: crate::symfony::console::formatter::OutputFormatterStyle, + ) { + self.set_style(name, style) + } + + fn has_style(&self, name: &str) -> bool { + self.has_style(name) + } + + fn get_style(&self, name: &str) -> crate::symfony::console::formatter::OutputFormatterStyle { + self.get_style(name) + } + + fn format(&self, message: &str) -> String { + self.format(message) + } } diff --git a/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_interface.rs b/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_interface.rs index dc93a3b..7f6e9b0 100644 --- a/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_interface.rs +++ b/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_interface.rs @@ -1,5 +1,10 @@ +use crate::symfony::console::formatter::OutputFormatterStyle; + pub trait OutputFormatterInterface { fn is_decorated(&self) -> bool; fn set_decorated(&mut self, decorated: bool); + fn set_style(&mut self, name: &str, style: OutputFormatterStyle); + fn has_style(&self, name: &str) -> bool; + fn get_style(&self, name: &str) -> OutputFormatterStyle; fn format(&self, message: &str) -> String; } |
