rusty_bubbletea/
nil_renderer.rs1use crate::model::Cmd;
11use crate::mouse::MouseMsg;
12use crate::renderer::Renderer;
13use crate::view::View;
14
15#[derive(Debug, Default, Clone, Copy)]
17pub struct NilRenderer;
18
19impl Renderer for NilRenderer {
20 fn start(&mut self) {}
21 fn close(&mut self) -> Result<(), Box<dyn std::error::Error>> {
22 Ok(())
23 }
24 fn render(&mut self, _view: View) {}
25 fn flush(&mut self, _closing: bool) -> Result<(), Box<dyn std::error::Error>> {
26 Ok(())
27 }
28 fn reset(&mut self) {}
29 fn insert_above(&mut self, _s: String) -> Result<(), Box<dyn std::error::Error>> {
30 Ok(())
31 }
32 fn resize(&mut self, _width: usize, _height: usize) {}
33 fn clear_screen(&mut self) {}
34 fn write_string(&mut self, _s: &str) -> Result<usize, Box<dyn std::error::Error>> {
35 Ok(0)
36 }
37 fn on_mouse(&mut self, _msg: MouseMsg) -> Cmd {
38 None
39 }
40
41 fn set_optimizations(&mut self, _hard_tabs: bool, _backspace: bool, _map_nl: bool) {}
42
43 fn set_color_profile(&mut self, _p: rusty_colorprofile::Profile) {}
44}