[−][src]Enum rust_keylock::Menu
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(String)
The User should be presented with a list of all the saved password Entries
, filtered by the string provided as argument
NewEntry
The User should create a new Entry
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
Current
Stay in the current menu
Methods
impl Menu
[src]
pub fn get_name(&self) -> String
[src]
Returns the name of a Menu
.
pub fn from(
name: String,
opt_num: Option<usize>,
opt_string: Option<String>
) -> Menu
[src]
name: String,
opt_num: Option<usize>,
opt_string: Option<String>
) -> Menu
Parses a String and creates a Menu
.
Menus that have additional usize
and String
arguments exist. Thus the existence of the Option
al arguments during parsing.
Trait Implementations
impl PartialEq<Menu> for Menu
[src]
impl Clone for Menu
[src]
fn clone(&self) -> Menu
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Menu
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self