pub struct CsvWriterOptions {
pub compression: i32,
pub delimiter: String,
pub has_header: bool,
pub date_format: String,
pub datetime_format: String,
pub timestamp_format: String,
pub time_format: String,
pub null_value: String,
pub quote: String,
pub escape: String,
pub double_quote: bool,
}
Fields§
§compression: i32
Compression type
delimiter: String
Optional column delimiter. Defaults to b','
has_header: bool
Whether to write column names as file headers. Defaults to true
date_format: String
Optional date format for date arrays
datetime_format: String
Optional datetime format for datetime arrays
timestamp_format: String
Optional timestamp format for timestamp arrays
time_format: String
Optional time format for time arrays
null_value: String
Optional value to represent null
quote: String
Optional quote. Defaults to b'"'
escape: String
Optional escape. Defaults to '\\'
double_quote: bool
Optional flag whether to double quotes, instead of escaping. Defaults to true
Implementations§
Source§impl CsvWriterOptions
impl CsvWriterOptions
Sourcepub fn compression(&self) -> CompressionTypeVariant
pub fn compression(&self) -> CompressionTypeVariant
Returns the enum value of compression
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_compression(&mut self, value: CompressionTypeVariant)
pub fn set_compression(&mut self, value: CompressionTypeVariant)
Sets compression
to the provided enum value.
Trait Implementations§
Source§impl Clone for CsvWriterOptions
impl Clone for CsvWriterOptions
Source§fn clone(&self) -> CsvWriterOptions
fn clone(&self) -> CsvWriterOptions
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 moreSource§impl Debug for CsvWriterOptions
impl Debug for CsvWriterOptions
Source§impl Default for CsvWriterOptions
impl Default for CsvWriterOptions
Source§fn default() -> CsvWriterOptions
fn default() -> CsvWriterOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CsvWriterOptions
impl<'de> Deserialize<'de> for CsvWriterOptions
Source§fn deserialize<D>(
deserializer: D,
) -> Result<CsvWriterOptions, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CsvWriterOptions, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for CsvWriterOptions
impl Message for CsvWriterOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl PartialEq for CsvWriterOptions
impl PartialEq for CsvWriterOptions
Source§impl Serialize for CsvWriterOptions
impl Serialize for CsvWriterOptions
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<&CsvWriterOptions> for CsvWriterOptions
impl TryFrom<&CsvWriterOptions> for CsvWriterOptions
Source§type Error = DataFusionError
type Error = DataFusionError
The type returned in the event of a conversion error.
Source§fn try_from(
opts: &CsvWriterOptions,
) -> Result<CsvWriterOptions, <CsvWriterOptions as TryFrom<&CsvWriterOptions>>::Error>
fn try_from( opts: &CsvWriterOptions, ) -> Result<CsvWriterOptions, <CsvWriterOptions as TryFrom<&CsvWriterOptions>>::Error>
Performs the conversion.
impl StructuralPartialEq for CsvWriterOptions
Auto Trait Implementations§
impl Freeze for CsvWriterOptions
impl RefUnwindSafe for CsvWriterOptions
impl Send for CsvWriterOptions
impl Sync for CsvWriterOptions
impl Unpin for CsvWriterOptions
impl UnwindSafe for CsvWriterOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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