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 Editor
s (Shell, Web, Android, other…).
It drives the interaction with the Users
Required Methods§
Sourcefn show_password_enter(&self) -> Receiver<UserSelection>
fn show_password_enter(&self) -> Receiver<UserSelection>
Shows the interface for entering a Password and a Number.
Sourcefn show_change_password(&self) -> Receiver<UserSelection>
fn show_change_password(&self) -> Receiver<UserSelection>
Shows the interface for changing a Password and/or a Number.
Shows the specified Menu
to the User.
Sourcefn show_entries(
&self,
entries: Vec<Entry>,
filter: String,
) -> Receiver<UserSelection>
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.
Sourcefn show_entry(
&self,
entry: Entry,
index: usize,
presentation_type: EntryPresentationType,
) -> Receiver<UserSelection>
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.
Sourcefn exit(&self, contents_changed: bool) -> Receiver<UserSelection>
fn exit(&self, contents_changed: bool) -> Receiver<UserSelection>
Shows the Exit Menu
to the User.
Sourcefn show_configuration(
&self,
nextcloud: NextcloudConfiguration,
dropbox: DropboxConfiguration,
) -> Receiver<UserSelection>
fn show_configuration( &self, nextcloud: NextcloudConfiguration, dropbox: DropboxConfiguration, ) -> Receiver<UserSelection>
Shows the configuration screen.
Sourcefn show_message(
&self,
message: &str,
options: Vec<UserOption>,
severity: MessageSeverity,
) -> Receiver<UserSelection>
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 UserOption
s.
Provided Methods§
Sourcefn sort_entries(&self, entries: &mut [Entry])
fn sort_entries(&self, entries: &mut [Entry])
Sorts the supplied entries.