AsyncEditor

Trait AsyncEditor 

Source
pub trait AsyncEditor {
    // Required methods
    fn show_password_enter<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn show_change_password<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn show_menu<'life0, 'async_trait>(
        &'life0 self,
        menu: Menu,
    ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn show_entries<'life0, 'async_trait>(
        &'life0 self,
        entries: Vec<Entry>,
        filter: String,
    ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn show_entry<'life0, 'async_trait>(
        &'life0 self,
        entry: Entry,
        index: usize,
        presentation_type: EntryPresentationType,
    ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn exit<'life0, 'async_trait>(
        &'life0 self,
        contents_changed: bool,
    ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn show_configuration<'life0, 'async_trait>(
        &'life0 self,
        nextcloud: NextcloudConfiguration,
        dropbox: DropboxConfiguration,
        general: GeneralConfiguration,
    ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn show_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 str,
        options: Vec<UserOption>,
        severity: MessageSeverity,
    ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn start_rest_server(&self) -> bool;

    // 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<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shows the interface for entering a Password and a Number.

Source

fn show_change_password<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn show_menu<'life0, 'async_trait>( &'life0 self, menu: Menu, ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shows the specified Menu to the User.

Source

fn show_entries<'life0, 'async_trait>( &'life0 self, entries: Vec<Entry>, filter: String, ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn show_entry<'life0, 'async_trait>( &'life0 self, entry: Entry, index: usize, presentation_type: EntryPresentationType, ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn exit<'life0, 'async_trait>( &'life0 self, contents_changed: bool, ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shows the Exit Menu to the User.

Source

fn show_configuration<'life0, 'async_trait>( &'life0 self, nextcloud: NextcloudConfiguration, dropbox: DropboxConfiguration, general: GeneralConfiguration, ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shows the configuration screen.

Source

fn show_message<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 str, options: Vec<UserOption>, severity: MessageSeverity, ) -> Pin<Box<dyn Future<Output = UserSelection> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

Source

fn start_rest_server(&self) -> bool

Denotes if the rest_server should be start or nor

Provided Methods§

Source

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

Sorts the supplied entries.

Implementors§