Skip to main content

App

Trait App 

Source
pub trait App:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &str;
    fn tables(&self) -> Vec<&dyn Table>;

    // Provided methods
    fn subtitle(&self) -> Option<&str> { ... }
    fn views(&self) -> Vec<&dyn View> { ... }
    fn front(&self) -> Front { ... }
    fn table(&self, route: &str) -> Option<&dyn Table> { ... }
    fn view(&self, route: &str) -> Option<&dyn View> { ... }
}
Expand description

One repository’s editor: a name for the shell, the tables it serves, and the views it computes.

Required Methods§

Source

fn name(&self) -> &str

Source

fn tables(&self) -> Vec<&dyn Table>

The tables in the order the shell lists them. The first is what the editor opens when nothing else is named.

Provided Methods§

Source

fn subtitle(&self) -> Option<&str>

Source

fn views(&self) -> Vec<&dyn View>

The views in the order the shell lists them, before the tables. An app of tables alone leaves this alone and serves none.

Source

fn front(&self) -> Front

What a bare address opens.

Source

fn table(&self, route: &str) -> Option<&dyn Table>

Source

fn view(&self, route: &str) -> Option<&dyn View>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§