bitwarden_uniffi/vault/
folders.rs1use bitwarden_vault::{Folder, FolderView};
2
3use crate::{error::Error, Result};
4
5#[allow(missing_docs)]
6#[derive(uniffi::Object)]
7pub struct FoldersClient(pub(crate) bitwarden_vault::FoldersClient);
8
9#[uniffi::export]
10impl FoldersClient {
11 pub fn encrypt(&self, folder: FolderView) -> Result<Folder> {
13 Ok(self.0.encrypt(folder).map_err(Error::Encrypt)?)
14 }
15
16 pub fn decrypt(&self, folder: Folder) -> Result<FolderView> {
18 Ok(self.0.decrypt(folder).map_err(Error::Decrypt)?)
19 }
20
21 pub fn decrypt_list(&self, folders: Vec<Folder>) -> Result<Vec<FolderView>> {
23 Ok(self.0.decrypt_list(folders).map_err(Error::Decrypt)?)
24 }
25}