pub struct CreateOptions { /* private fields */ }Expand description
A builder for configuring a new litebox.
Implementations§
Source§impl CreateOptions
impl CreateOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new CreateOptions with default settings.
Sourcepub fn compression(self, enabled: bool) -> Self
pub fn compression(self, enabled: bool) -> Self
Enable or disable file compression.
This compresses data to reduce storage usage at the cost of performance.
The default value is false.
§See Also
Sourcepub fn chunking(self, enabled: bool) -> Self
pub fn chunking(self, enabled: bool) -> Self
Enable or disable content-defined chunking.
This deduplicates data at the sub-file level to reduce storage usage for similar files at the cost of performance.
The default value is false.
§See Also
Sourcepub fn encryption_secret(self, secret: EncryptionSecret) -> Self
pub fn encryption_secret(self, secret: EncryptionSecret) -> Self
Encrypt the litebox with the given secret via SQLCipher.
Sourcepub fn block_size(self, bytes: usize) -> Self
pub fn block_size(self, bytes: usize) -> Self
Change the block size from its default.
The block size has implications for performance, storage efficiency, and memory usage. The correct value depends on your workload.
The block size must be a power of 2 between 16 KiB and 128 KiB, however these limits may change in future versions. A value outside this range will be clamped to the nearest bound. A value that is not a power of 2 will be rounded down to the nearest power of 2.
The default block size is currently 32 KiB, however this may change in future versions.
Sourcepub fn skip_application_id(self, skip: bool) -> Self
pub fn skip_application_id(self, skip: bool) -> Self
Skip setting the SQLite application_id.
By default, creating a litebox sets the SQLite
application_id to the magic
number 0x6c626f78 (b"lbox"). If you are using LiteboxFS to implement your own
application file format, you may want to set the application_id yourself.
The default value is false.
§See Also
Trait Implementations§
Source§impl Clone for CreateOptions
impl Clone for CreateOptions
Source§fn clone(&self) -> CreateOptions
fn clone(&self) -> CreateOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more