bitwarden_commercial_vault/
vault_client.rs

1use bitwarden_core::Client;
2#[cfg(feature = "wasm")]
3use wasm_bindgen::prelude::*;
4
5#[allow(missing_docs)]
6#[derive(Clone)]
7#[cfg_attr(feature = "wasm", wasm_bindgen)]
8pub struct CommercialVaultClient {
9    #[allow(unused)]
10    pub(crate) client: Client,
11}
12
13impl CommercialVaultClient {
14    fn new(client: Client) -> Self {
15        Self { client }
16    }
17}
18
19#[cfg_attr(feature = "wasm", wasm_bindgen)]
20impl CommercialVaultClient {}
21
22#[allow(missing_docs)]
23pub trait CommercialVaultClientExt {
24    fn vault(&self) -> CommercialVaultClient;
25}
26
27impl CommercialVaultClientExt for Client {
28    fn vault(&self) -> CommercialVaultClient {
29        CommercialVaultClient::new(self.clone())
30    }
31}