pub struct StorageConfig {
pub path: Option<String>,
pub encrypted: bool,
pub compressed: bool,
pub cache_size: usize,
pub argon2_config: Argon2Config,
}Expand description
Configuration for file-based storage
Controls encryption, compression and caching behaviour for persistent storage.
Fields§
§path: Option<String>Path to storage location (file, directory, etc.)
encrypted: boolEnable encryption at rest
compressed: boolEnable compression
cache_size: usizeMaximum number of keys to cache in memory
argon2_config: Argon2ConfigImplementations§
Source§impl StorageConfig
impl StorageConfig
Sourcepub fn high_security() -> Self
pub fn high_security() -> Self
Create a config with high security Argon2 parameters
Sourcepub fn fast_insecure() -> Self
pub fn fast_insecure() -> Self
Trait Implementations§
Source§impl Clone for StorageConfig
impl Clone for StorageConfig
Source§fn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StorageConfig
impl Debug for StorageConfig
Auto Trait Implementations§
impl Freeze for StorageConfig
impl RefUnwindSafe for StorageConfig
impl Send for StorageConfig
impl Sync for StorageConfig
impl Unpin for StorageConfig
impl UnwindSafe for StorageConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more