pub enum Menu {
Show 18 variants
TryPass(bool),
ChangePass,
Main,
EntriesList(Option<String>),
NewEntry(Option<Entry>),
ShowEntry(usize),
EditEntry(usize),
DeleteEntry(usize),
Save(bool),
Exit,
ForceExit,
TryFileRecovery,
ImportEntries,
ExportEntries,
ShowConfiguration,
WaitForDbxTokenCallback(String),
SetDbxToken(Zeroizing<String>),
Current,
}Expand description
Enumeration of the several different Menus that an Editor implementation should handle.
Variants§
TryPass(bool)
The User should provide a password and a number. If bool is true, the last_sync_version will be updated to be the same with the local_version. If false, nothing will be updated.
ChangePass
The User should provide a new password and a new number.
Main
The User should be presented with the main menu.
EntriesList(Option<String>)
The User should be presented with a list of all the saved password Entries, optiolally filtered by the string provided as argument.
NewEntry(Option<Entry>)
The User should create a new Entry. The optional Entry argument is an initial entry from which the User could start.
It may contain a system-generated passphrase etc.
ShowEntry(usize)
The User should be presented with a selected Entry.
The index of the Entry inside the Entries list is provided.
EditEntry(usize)
The User should edit a selected Entry.
The index of the Entry inside the Entries list is provided.
DeleteEntry(usize)
The User deletes a selected Entry.
The index of the Entry inside the Entries list is provided.
Save(bool)
The User encrypts and saves all the existing Entries list.
If bool is true, the last_sync_version will be updated to be the same with the local_version.
If false, only the local_version will be updated.
Exit
The User selects to Exit rust-keylock
ForceExit
The User selects to Exit rust-keylock, even if there is unsaved data.
TryFileRecovery
Parsing the Entries after decrypting them may lead to wrong data. This Menu informs the User about the situation and offers an attempt to recover anything that is recoverable.
ImportEntries
The user should be able to import password Entries.
ExportEntries
The user should be able to export password Entries.
ShowConfiguration
The user should be presented with the configuration menu
WaitForDbxTokenCallback(String)
Temporarily creates a web server and waits for the callback HTTP request that obtains the Dropbox token
SetDbxToken(Zeroizing<String>)
Sets the dropbox token
Current
Stay in the current menu