pub struct FreezerFilesBuilder { /* private fields */ }
Expand description
Freezer factory, which can be used in order to configure the properties of a new freezer.
Implementations§
Source§impl FreezerFilesBuilder
impl FreezerFilesBuilder
Sourcepub fn new(file_path: PathBuf) -> Self
pub fn new(file_path: PathBuf) -> Self
Generates the base configuration for a new freezer instance
Sourcepub fn max_file_size(self, size: u64) -> Self
pub fn max_file_size(self, size: u64) -> Self
Sets the max size of the file (in bytes) for the new freezer.
Sourcepub fn open_files_limit(self, limit: usize) -> Self
pub fn open_files_limit(self, limit: usize) -> Self
Sets the limit of opened files for the new freezer.
§Panics
Panics when limit <= 1
, meaning freezer must open at least 2 files.
Sourcepub fn enable_compression(self, enable_compression: bool) -> Self
pub fn enable_compression(self, enable_compression: bool) -> Self
Sets the compression enable for the new freezer.
Auto Trait Implementations§
impl Freeze for FreezerFilesBuilder
impl RefUnwindSafe for FreezerFilesBuilder
impl Send for FreezerFilesBuilder
impl Sync for FreezerFilesBuilder
impl Unpin for FreezerFilesBuilder
impl UnwindSafe for FreezerFilesBuilder
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