bitwarden_wasm_internal/vault/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pub mod folders;

use std::rc::Rc;

use bitwarden_core::Client;
use wasm_bindgen::prelude::*;

use crate::ClientFolders;

#[wasm_bindgen]
pub struct VaultClient(Rc<Client>);

impl VaultClient {
    pub fn new(client: Rc<Client>) -> Self {
        Self(client)
    }
}

#[wasm_bindgen]
impl VaultClient {
    pub fn folders(&self) -> ClientFolders {
        ClientFolders::new(self.0.clone())
    }
}