wallet_lib/
command.rs

1
2// #[derive(Clone, Copy)]
3#[derive(Debug)]
4pub struct CommandOptions {
5    wallet_path: String,
6}
7
8impl CommandOptions {
9    pub fn new() -> Self {
10        CommandOptions {
11            wallet_path: String::new(),
12        }
13    }
14
15    fn wallet_path(&self) -> String {
16        println!("-> CommandOptions::wallet_path()");
17
18        // self.wallet_path.clone()
19        String::new() // TODO
20    }
21}
22
23trait Command {
24    fn exec(&self);
25}
26
27struct AddCommand {
28    options: CommandOptions,
29}
30
31impl Command for AddCommand {
32    fn exec(&self) {
33        println!("-> AddCommand::exec()");
34
35        // let _wallet = Wallet::new_with_path(self.options.wallet_path());
36        // let _entry = Entry::new();
37
38        // _wallet.add(_entry);
39    }
40}