pub struct BackupOptions {
pub encryption: Option<EncryptionKey>,
pub compression: bool,
pub compression_level: u32,
}Expand description
Backup options
Fields§
§encryption: Option<EncryptionKey>Optional encryption key
compression: boolEnable compression (gzip)
compression_level: u32Compression level (0-9, default 6)
Implementations§
Source§impl BackupOptions
impl BackupOptions
Sourcepub fn with_encryption(self, key: EncryptionKey) -> Self
pub fn with_encryption(self, key: EncryptionKey) -> Self
Enable encryption with the given key
Sourcepub fn with_compression(self, enabled: bool) -> Self
pub fn with_compression(self, enabled: bool) -> Self
Enable or disable compression
Sourcepub fn with_compression_level(self, level: u32) -> Self
pub fn with_compression_level(self, level: u32) -> Self
Set compression level (0-9)
Sourcepub fn is_encrypted(&self) -> bool
pub fn is_encrypted(&self) -> bool
Check if encryption is enabled
Trait Implementations§
Source§impl Clone for BackupOptions
impl Clone for BackupOptions
Source§fn clone(&self) -> BackupOptions
fn clone(&self) -> BackupOptions
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 Default for BackupOptions
impl Default for BackupOptions
Source§fn default() -> BackupOptions
fn default() -> BackupOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BackupOptions
impl RefUnwindSafe for BackupOptions
impl Send for BackupOptions
impl Sync for BackupOptions
impl Unpin for BackupOptions
impl UnwindSafe for BackupOptions
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