Trait bonsaidb_local::config::Builder
source · pub trait Builder: Sized {
Show 14 methods
// Required methods
fn with_schema<S: Schema>(self) -> Result<Self, Error>;
fn memory_only(self) -> Self;
fn path<P: AsRef<Path>>(self, path: P) -> Self;
fn unique_id(self, unique_id: u64) -> Self;
fn vault_key_storage<VaultKeyStorage: AnyVaultKeyStorage>(
self,
key_storage: VaultKeyStorage
) -> Self;
fn default_encryption_key(self, key: KeyId) -> Self;
fn tasks_worker_count(self, worker_count: usize) -> Self;
fn tasks_parallelization(self, parallelization: usize) -> Self;
fn check_view_integrity_on_open(self, check: bool) -> Self;
fn default_compression(self, compression: Compression) -> Self;
fn key_value_persistence(self, persistence: KeyValuePersistence) -> Self;
fn authenticated_permissions<P: Into<Permissions>>(
self,
authenticated_permissions: P
) -> Self;
fn argon(self, argon: ArgonConfiguration) -> Self;
// Provided method
fn new<P: AsRef<Path>>(path: P) -> Self
where Self: Default { ... }
}
Expand description
Storage configuration builder methods.
Required Methods§
sourcefn with_schema<S: Schema>(self) -> Result<Self, Error>
fn with_schema<S: Schema>(self) -> Result<Self, Error>
Registers the schema and returns self.
sourcefn memory_only(self) -> Self
fn memory_only(self) -> Self
Sets StorageConfiguration::memory_only
to true and returns self.
sourcefn path<P: AsRef<Path>>(self, path: P) -> Self
fn path<P: AsRef<Path>>(self, path: P) -> Self
Sets StorageConfiguration::path
to path
and returns self.
sourcefn unique_id(self, unique_id: u64) -> Self
fn unique_id(self, unique_id: u64) -> Self
Sets StorageConfiguration::unique_id
to unique_id
and returns self.
sourcefn vault_key_storage<VaultKeyStorage: AnyVaultKeyStorage>(
self,
key_storage: VaultKeyStorage
) -> Self
fn vault_key_storage<VaultKeyStorage: AnyVaultKeyStorage>( self, key_storage: VaultKeyStorage ) -> Self
Sets StorageConfiguration::vault_key_storage
to key_storage
and returns self.
sourcefn default_encryption_key(self, key: KeyId) -> Self
fn default_encryption_key(self, key: KeyId) -> Self
Sets StorageConfiguration::default_encryption_key
to path
and returns self.
sourcefn tasks_worker_count(self, worker_count: usize) -> Self
fn tasks_worker_count(self, worker_count: usize) -> Self
Sets Tasks::worker_count
to worker_count
and returns self.
sourcefn tasks_parallelization(self, parallelization: usize) -> Self
fn tasks_parallelization(self, parallelization: usize) -> Self
Sets Tasks::parallelization
to parallelization
and returns self.
sourcefn check_view_integrity_on_open(self, check: bool) -> Self
fn check_view_integrity_on_open(self, check: bool) -> Self
Sets Views::check_integrity_on_open
to check
and returns self.
sourcefn default_compression(self, compression: Compression) -> Self
fn default_compression(self, compression: Compression) -> Self
Sets StorageConfiguration::default_compression
to path
and returns self.
sourcefn key_value_persistence(self, persistence: KeyValuePersistence) -> Self
fn key_value_persistence(self, persistence: KeyValuePersistence) -> Self
Sets StorageConfiguration::key_value_persistence
to persistence
and returns self.
sourcefn authenticated_permissions<P: Into<Permissions>>(
self,
authenticated_permissions: P
) -> Self
fn authenticated_permissions<P: Into<Permissions>>( self, authenticated_permissions: P ) -> Self
Sets Self::authenticated_permissions
to authenticated_permissions
and returns self.
sourcefn argon(self, argon: ArgonConfiguration) -> Self
fn argon(self, argon: ArgonConfiguration) -> Self
Sets StorageConfiguration::argon
to argon
and returns self.