Struct mtbl::WriterOptions
[−]
[src]
pub struct WriterOptions { pub compression: Option<CompressionType>, pub block_size: Option<usize>, pub block_restart_interval: Option<usize>, }
Options for writing an MTBL file.
Examples
let writer = WriterOptions::new() .compression(CompressionType::MTBL_COMPRESSION_SNAPPY) .create_from_path("/tmp/f.mtbl");Run
Fields
compression: Option<CompressionType>
What compression type to use. Default is to use zlib.
block_size: Option<usize>
What block size to use, in bytes. Default is 8 KiB.
block_restart_interval: Option<usize>
How often, in keys, to restart intra-block key prefix compression. Default is every 16 keys.
Methods
impl WriterOptions
[src]
fn new() -> WriterOptions
Create new options with only defaults.
fn compression(self: &Self, compression: CompressionType) -> WriterOptions
Create a new options with compression type set.
fn block_size(self: &Self, block_size: usize) -> WriterOptions
Create a new options with block size set.
fn block_restart_interval(self: &Self, block_restart_interval: usize) -> WriterOptions
Create a new options with block restart interval set.
fn create_from_path<T: AsRef<Path>>(self: &Self, path: T) -> IOResult<Writer>
Create a new Writer
using these options, at a given path.
fn create_from_file<T: 'static + AsRawFd>(self: &Self, file: T) -> IOResult<Writer>
Create a new Writer
using these options, with a given File
.
Trait Implementations
impl Clone for WriterOptions
[src]
fn clone(&self) -> WriterOptions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more