1use crate::{Event, Node}; 2 3pub trait Component<MSG> { 4 fn update(&mut self, msg: MSG); 5 6 fn on_event(&mut self, event: Event) { 7 // only tui backend use this 8 } 9 10 fn debug(&mut self, s: String) { 11 // only tui backend use this 12 } 13 14 fn view(&self) -> Node<MSG>; 15}