bitwarden_uniffi/vault/
folders.rsuse std::sync::Arc;
use bitwarden_vault::{Folder, FolderView, VaultClientExt};
use crate::{Client, Result};
#[derive(uniffi::Object)]
pub struct ClientFolders(pub Arc<Client>);
#[uniffi::export]
impl ClientFolders {
pub fn encrypt(&self, folder: FolderView) -> Result<Folder> {
Ok(self.0 .0.vault().folders().encrypt(folder)?)
}
pub fn decrypt(&self, folder: Folder) -> Result<FolderView> {
Ok(self.0 .0.vault().folders().decrypt(folder)?)
}
pub fn decrypt_list(&self, folders: Vec<Folder>) -> Result<Vec<FolderView>> {
Ok(self.0 .0.vault().folders().decrypt_list(folders)?)
}
}