wallet_lib/
wallet.rs

1
2#[derive(Debug)]
3pub struct Wallet {
4    path: String,
5}
6
7impl Wallet {
8    fn new() -> Self {
9        println!("-> Wallet::new()");
10
11        Wallet {
12            path: String::new(), // TODO
13        }
14    }
15
16    fn new_with_path(path: String) -> Self {
17        println!("-> Wallet::new_with_path({})", path);
18
19        let _w = Wallet {
20            path: path,
21        };
22        _w.init();
23
24        _w
25    }
26
27    fn init(&self) {
28        println!("-> Wallet::init()");
29        self.create_dirs();
30    }
31
32    fn create_dirs(&self) {
33        println!("-> Wallet::create_dirs()");
34    }
35
36    // fn add(&self, entry: Entry) {
37    //     println!("-> Wallet::add() {:?}", entry);
38    // }
39}