[][src]Trait rust_keylock::Editor

pub trait Editor {
    fn show_password_enter(&self) -> UserSelection;
fn show_change_password(&self) -> UserSelection;
fn show_menu(
        &self,
        menu: &Menu,
        safe: &Safe,
        configuration: &RklConfiguration
    ) -> UserSelection;
fn exit(&self, contents_changed: bool) -> UserSelection;
fn show_message(
        &self,
        message: &str,
        options: Vec<UserOption>,
        severity: MessageSeverity
    ) -> UserSelection; fn sort_entries(&self, entries: &mut [Entry]) { ... } }

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

It drives the interaction with the Users

Required methods

fn show_password_enter(&self) -> UserSelection

Shows the interface for entering a Password and a Number.

fn show_change_password(&self) -> UserSelection

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

fn show_menu(
    &self,
    menu: &Menu,
    safe: &Safe,
    configuration: &RklConfiguration
) -> UserSelection

Shows the specified Menu to the User.

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

Shows the Exit Menu to the User.

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

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

Loading content...

Provided methods

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

Sorts the supplied entries.

Loading content...

Implementors

Loading content...