pub struct WriterBuilder { /* private fields */ }
Expand description
A struct that is used to configure a Writer
.
Implementations§
Source§impl WriterBuilder
impl WriterBuilder
Sourcepub fn new() -> WriterBuilder
pub fn new() -> WriterBuilder
Creates a WriterBuilder
, it can be used to
configure your Writer
to better fit your needs.
Sourcepub fn compression_type(
&mut self,
compression_type: CompressionType,
) -> &mut Self
pub fn compression_type( &mut self, compression_type: CompressionType, ) -> &mut Self
Defines the CompressionType
that will be used to compress the writer blocks.
Sourcepub fn compression_level(&mut self, level: u32) -> &mut Self
pub fn compression_level(&mut self, level: u32) -> &mut Self
Defines the copression level of the defined CompressionType
that will be used to compress the writer blocks.
Sourcepub fn block_size(&mut self, size: usize) -> &mut Self
pub fn block_size(&mut self, size: usize) -> &mut Self
Defines the size of the blocks that the writer will writer.
The bigger the blocks are the better they are compressed but the more time it takes to compress and decompress them.
Sourcepub fn index_key_interval(&mut self, interval: NonZeroUsize) -> &mut Self
pub fn index_key_interval(&mut self, interval: NonZeroUsize) -> &mut Self
The interval at which we store the index of a key in the index footer, used to seek into a block.
Sourcepub fn index_levels(&mut self, levels: u8) -> &mut Self
pub fn index_levels(&mut self, levels: u8) -> &mut Self
The number of levels/indirection we will use to write the index footer.
An indirection of 1 or 2 is sufficient to reduce the impact of decompressing/reading the index block footer.
The default is 0 which means that the index block footer values directly specifies the block where the requested data entries can be found. The disavantage of this is that the index block can be quite big and take time to be decompressed and read.
Trait Implementations§
Source§impl Default for WriterBuilder
impl Default for WriterBuilder
Source§fn default() -> WriterBuilder
fn default() -> WriterBuilder
Auto Trait Implementations§
impl Freeze for WriterBuilder
impl RefUnwindSafe for WriterBuilder
impl Send for WriterBuilder
impl Sync for WriterBuilder
impl Unpin for WriterBuilder
impl UnwindSafe for WriterBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more