Trait AsyncEditor

Source
pub trait AsyncEditor {
    // Required methods
    fn show_password_enter(&self) -> Receiver<UserSelection>;
    fn show_change_password(&self) -> Receiver<UserSelection>;
    fn show_menu(&self, menu: &Menu) -> Receiver<UserSelection>;
    fn show_entries(
        &self,
        entries: Vec<Entry>,
        filter: String,
    ) -> Receiver<UserSelection>;
    fn show_entry(
        &self,
        entry: Entry,
        index: usize,
        presentation_type: EntryPresentationType,
    ) -> Receiver<UserSelection>;
    fn exit(&self, contents_changed: bool) -> Receiver<UserSelection>;
    fn show_configuration(
        &self,
        nextcloud: NextcloudConfiguration,
        dropbox: DropboxConfiguration,
    ) -> Receiver<UserSelection>;
    fn show_message(
        &self,
        message: &str,
        options: Vec<UserOption>,
        severity: MessageSeverity,
    ) -> Receiver<UserSelection>;

    // Provided method
    fn sort_entries(&self, entries: &mut [Entry]) { ... }
}
Expand description

Trait to be implemented by various different Editors (Shell, Web, Android, other…).

It drives the interaction with the Users

Required Methods§

Source

fn show_password_enter(&self) -> Receiver<UserSelection>

Shows the interface for entering a Password and a Number.

Source

fn show_change_password(&self) -> Receiver<UserSelection>

Shows the interface for changing a Password and/or a Number.

Source

fn show_menu(&self, menu: &Menu) -> Receiver<UserSelection>

Shows the specified Menu to the User.

Source

fn show_entries( &self, entries: Vec<Entry>, filter: String, ) -> Receiver<UserSelection>

Shows the provided entries to the User. The provided entries are already filtered with the filter argument.

Source

fn show_entry( &self, entry: Entry, index: usize, presentation_type: EntryPresentationType, ) -> Receiver<UserSelection>

Shows the provided entry details to the User following a presentation type.

Source

fn exit(&self, contents_changed: bool) -> Receiver<UserSelection>

Shows the Exit Menu to the User.

Source

fn show_configuration( &self, nextcloud: NextcloudConfiguration, dropbox: DropboxConfiguration, ) -> Receiver<UserSelection>

Shows the configuration screen.

Source

fn show_message( &self, message: &str, options: Vec<UserOption>, severity: MessageSeverity, ) -> Receiver<UserSelection>

Shows a message to the User. Along with the message, the user should select one of the offered UserOptions.

Provided Methods§

Source

fn sort_entries(&self, entries: &mut [Entry])

Sorts the supplied entries.

Implementors§