#[non_exhaustive]pub struct WriterOptions {
pub row_ids: bool,
pub row_block_target: u64,
pub byte_block_target: u64,
pub codec: WriterCodec,
pub zstd_level: i32,
pub encoding: WriterEncoding,
pub statistics: WriterStatistics,
}Expand description
Options for buffered Stage 7 writing.
Blocks are published when either target is reached, so the buffer holds at most one target’s worth of rows and the two targets together bound the writer’s memory. A single row whose encoded representation exceeds the byte target is accepted as an unavoidable oversize block; this keeps the buffer bounded for all splittable input while preserving row order. The default codec is raw, so default output remains deterministic and uses the same raw wire representation as the Stage 6 writer.
This type is #[non_exhaustive], so build it from WriterOptions::new or
Default and the with_ methods rather than a struct literal. Later
format work can then add an option without breaking callers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.row_ids: boolWhether blocks carry the implicit contiguous row-ID sequence.
row_block_target: u64Maximum logical rows in one buffered block.
byte_block_target: u64Maximum estimated raw serialized bytes in one buffered block.
codec: WriterCodecCodec applied independently after each selected transform.
zstd_level: i32Zstandard compression level used when codec is WriterCodec::Zstandard.
The value is ignored for WriterCodec::None. Supported levels are
checked when the writer is created or opened.
encoding: WriterEncodingLayout and transform selection policy.
statistics: WriterStatisticsOptional block-local min/max statistics policy.
Implementations§
Source§impl WriterOptions
impl WriterOptions
Sourcepub const fn with_row_ids(self, enabled: bool) -> Self
pub const fn with_row_ids(self, enabled: bool) -> Self
Enable or disable implicit row IDs.
Sourcepub const fn with_row_block_target(self, rows: u64) -> Self
pub const fn with_row_block_target(self, rows: u64) -> Self
Set the maximum logical rows in one block.
Sourcepub const fn with_byte_block_target(self, bytes: u64) -> Self
pub const fn with_byte_block_target(self, bytes: u64) -> Self
Set the maximum estimated raw serialized bytes in one block.
Sourcepub const fn with_codec(self, codec: WriterCodec) -> Self
pub const fn with_codec(self, codec: WriterCodec) -> Self
Select raw or Zstandard stream storage.
Sourcepub const fn with_zstd_level(self, level: i32) -> Self
pub const fn with_zstd_level(self, level: i32) -> Self
Set the Zstandard compression level.
The setting is used only when Self::with_codec selects
WriterCodec::Zstandard. The default is DEFAULT_ZSTD_LEVEL.
Sourcepub const fn with_encoding(self, encoding: WriterEncoding) -> Self
pub const fn with_encoding(self, encoding: WriterEncoding) -> Self
Select the raw, adaptive, or fixed-transform writer policy.
Sourcepub const fn with_statistics(self, statistics: WriterStatistics) -> Self
pub const fn with_statistics(self, statistics: WriterStatistics) -> Self
Select the optional min/max statistics policy.
Trait Implementations§
Source§impl Clone for WriterOptions
impl Clone for WriterOptions
Source§fn clone(&self) -> WriterOptions
fn clone(&self) -> WriterOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more