Skip to main content

WriterOptions

Struct WriterOptions 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§row_ids: bool

Whether blocks carry the implicit contiguous row-ID sequence.

§row_block_target: u64

Maximum logical rows in one buffered block.

§byte_block_target: u64

Maximum estimated raw serialized bytes in one buffered block.

§codec: WriterCodec

Codec applied independently after each selected transform.

§zstd_level: i32

Zstandard 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: WriterEncoding

Layout and transform selection policy.

§statistics: WriterStatistics

Optional block-local min/max statistics policy.

Implementations§

Source§

impl WriterOptions

Source

pub const fn new() -> Self

Construct the default buffered raw-writing options.

Source

pub const fn with_row_ids(self, enabled: bool) -> Self

Enable or disable implicit row IDs.

Source

pub const fn with_row_block_target(self, rows: u64) -> Self

Set the maximum logical rows in one block.

Source

pub const fn with_byte_block_target(self, bytes: u64) -> Self

Set the maximum estimated raw serialized bytes in one block.

Source

pub const fn with_codec(self, codec: WriterCodec) -> Self

Select raw or Zstandard stream storage.

Source

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.

Source

pub const fn with_encoding(self, encoding: WriterEncoding) -> Self

Select the raw, adaptive, or fixed-transform writer policy.

Source

pub const fn with_statistics(self, statistics: WriterStatistics) -> Self

Select the optional min/max statistics policy.

Trait Implementations§

Source§

impl Clone for WriterOptions

Source§

fn clone(&self) -> WriterOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for WriterOptions

Source§

impl Debug for WriterOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WriterOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for WriterOptions

Source§

impl PartialEq for WriterOptions

Source§

fn eq(&self, other: &WriterOptions) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WriterOptions

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.