You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
phetch/src/ui/view.rs

14 lines
426 B
Rust

use crate::{config::Config, ui};
5 years ago
use std::fmt;
5 years ago
5 years ago
/// Views represent what's on screen, a Gopher Menu/Text/etc item.
5 years ago
pub trait View: fmt::Display {
5 years ago
fn respond(&mut self, key: ui::Key) -> ui::Action;
fn render(&mut self, cfg: &Config) -> String;
fn is_tls(&self) -> bool;
5 years ago
fn is_tor(&self) -> bool;
5 years ago
fn url(&self) -> String;
fn raw(&self) -> String;
fn term_size(&mut self, cols: usize, rows: usize);
}