pub struct DelimiterSeparatedTextReadOptions {
pub field_delimiter: String,
pub max_line_size: u64,
pub quote: String,
pub header_lines_to_skip: u64,
pub escape: String,
pub value_treated_as_null: Option<String>,
}
Expand description
Delimiter separated files may be compressed. The reader should autodetect this and decompress as needed.
Fields§
§field_delimiter: String
The character(s) used to separate fields. Common values are comma, tab, and pipe. Multiple characters are allowed.
max_line_size: u64
The maximum number of bytes to read from a single line. If a line exceeds this limit the resulting behavior is undefined.
quote: String
The character(s) used to quote strings. Common values are single and double quotation marks.
header_lines_to_skip: u64
The number of lines to skip at the beginning of the file.
escape: String
The character used to escape characters in strings. Backslash is a common value. Note that a double quote mark can also be used as an escape character but the external quotes should be removed first.
value_treated_as_null: Option<String>
If this value is encountered (including empty string), the resulting value is null instead. Leave unset to disable. If this value is provided, the effective schema of this file is comprised entirely of nullable strings. If not provided, the effective schema is instead made up of non-nullable strings.
Implementations§
Source§impl DelimiterSeparatedTextReadOptions
impl DelimiterSeparatedTextReadOptions
Sourcepub fn value_treated_as_null(&self) -> &str
pub fn value_treated_as_null(&self) -> &str
Returns the value of value_treated_as_null
, or the default value if value_treated_as_null
is unset.
Trait Implementations§
Source§impl Clone for DelimiterSeparatedTextReadOptions
impl Clone for DelimiterSeparatedTextReadOptions
Source§fn clone(&self) -> DelimiterSeparatedTextReadOptions
fn clone(&self) -> DelimiterSeparatedTextReadOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl<'de> Deserialize<'de> for DelimiterSeparatedTextReadOptions
impl<'de> Deserialize<'de> for DelimiterSeparatedTextReadOptions
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for DelimiterSeparatedTextReadOptions
impl Message for DelimiterSeparatedTextReadOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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,
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,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self
.Source§impl PartialEq for DelimiterSeparatedTextReadOptions
impl PartialEq for DelimiterSeparatedTextReadOptions
Source§fn eq(&self, other: &DelimiterSeparatedTextReadOptions) -> bool
fn eq(&self, other: &DelimiterSeparatedTextReadOptions) -> bool
self
and other
values to be equal, and is used by ==
.