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

source

pub fn new(file_path: PathBuf) -> Self

Generates the base configuration for a new freezer instance

source

pub fn max_file_size(self, size: u64) -> Self

Sets the max size of the file (in bytes) for the new freezer.

source

pub fn open_files_limit(self, limit: usize) -> Self

Sets the the limit of opened files for the new freezer.

§Panics

Panics when limit <= 1, meaning freezer must open at least 2 files.

source

pub fn enable_compression(self, enable_compression: bool) -> Self

Sets the compression enable for the new freezer.

source

pub fn build(self) -> Result<FreezerFiles, IoError>

Creates the freezer with the options configured in this builder.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V