pub trait View: Display {
fn respond(&mut self, key: Key) -> Action;
fn render(&mut self) -> String;
fn is_tls(&self) -> bool;
fn is_tor(&self) -> bool;
fn url(&self) -> &str;
fn raw(&self) -> &str;
fn set_wide(&mut self, wide: bool);
fn wide(&mut self) -> bool;
fn term_size(&mut self, cols: usize, rows: usize);
fn encoding(&self) -> Encoding { ... }
}
Expand description
Views represent what’s on screen, a Gopher Menu/Text/etc item.
Required Methods§
sourcefn respond(&mut self, key: Key) -> Action
fn respond(&mut self, key: Key) -> Action
Respond to a user action, specifically a keypress, by returning an Action enum.