pub struct WriterBuilder {
schema: Schema,
codec: Option<CompressionCodec>,
capacity: usize,
fingerprint_strategy: Option<FingerprintStrategy>,
}
Expand description
Builder to configure and create a Writer
.
Fields§
§schema: Schema
§codec: Option<CompressionCodec>
§capacity: usize
§fingerprint_strategy: Option<FingerprintStrategy>
Implementations§
Source§impl WriterBuilder
impl WriterBuilder
Sourcepub fn new(schema: Schema) -> Self
pub fn new(schema: Schema) -> Self
Create a new builder with default settings.
The Avro schema used for writing is determined as follows:
- If the Arrow schema metadata contains
avro::schema
(seeSCHEMA_METADATA_KEY
), that JSON is used verbatim. - Otherwise, the Arrow schema is converted to an Avro record schema.
Sourcepub fn with_fingerprint_strategy(self, strategy: FingerprintStrategy) -> Self
pub fn with_fingerprint_strategy(self, strategy: FingerprintStrategy) -> Self
Set the fingerprinting strategy for the stream writer. This determines the per-record prefix format.
Sourcepub fn with_compression(self, codec: Option<CompressionCodec>) -> Self
pub fn with_compression(self, codec: Option<CompressionCodec>) -> Self
Change the compression codec.
Sourcepub fn with_capacity(self, capacity: usize) -> Self
pub fn with_capacity(self, capacity: usize) -> Self
Sets the capacity for the given object and returns the modified instance.
Trait Implementations§
Source§impl Clone for WriterBuilder
impl Clone for WriterBuilder
Source§fn clone(&self) -> WriterBuilder
fn clone(&self) -> WriterBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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
Mutably borrows from an owned value. Read more