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