pub type VaultDiskDirectory = DiskDirectory<VaultKeyFileManager>;
Expand description

Vault directory implementation

Aliased Type§

struct VaultDiskDirectory { /* private fields */ }

Implementations§

source§

impl VaultDiskDirectory

source

pub fn create<P>(root: P, name: &str, key: VaultKey) -> Result<Self, Error>
where P: AsRef<Path>,

Create new vault directory with given key

source

pub fn at<P>(root: P, name: &str, key: VaultKey) -> Result<Self, Error>
where P: AsRef<Path>,

Open existing vault directory with given key

source

pub fn meta_at<P>(root: P, name: &str) -> Result<String, Error>
where P: AsRef<Path>,

Read vault meta without actually opening the vault

Trait Implementations§

source§

impl VaultKeyDirectory for VaultDiskDirectory

source§

fn as_key_directory(&self) -> &dyn KeyDirectory

Cast to KeyDirectory
source§

fn name(&self) -> &str

Vault name
source§

fn key(&self) -> VaultKey

Get vault key
source§

fn set_key(&self, new_key: VaultKey) -> Result<(), SetKeyError>

Set new key for vault
source§

fn meta(&self) -> String

Get vault meta
source§

fn set_meta(&self, meta: &str) -> Result<(), Error>

Set vault meta