Trait phetch::ui::View

source ·
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§

Respond to a user action, specifically a keypress, by returning an Action enum.

Create a String of the current view’s state that can be printed to the screen.

Was this View’s content fetched using TLS?

Was this View’s content fetched over Tor?

The Gopher URL this View represents.

The raw Gopher representation of this View.

Set wide mode on this view.

In wide mode?

Set the current screen size.

Provided Methods§

The current encoding.

Implementors§