Enum QuoteStyle
#[non_exhaustive]pub enum QuoteStyle {
Always,
Necessary,
NonNumeric,
Never,
}Expand description
The quoting style to use when writing CSV files.
This type is re-exported from the csv crate and supports different
strategies for quoting fields. It is compatible with Apache Spark’s
CSV options like quoteAll.
§Example
use arrow_csv::{WriterBuilder, QuoteStyle};
let builder = WriterBuilder::new()
.with_quote_style(QuoteStyle::Always); // Equivalent to Spark's quoteAll=trueThe quoting style to use when writing CSV data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Always
This puts quotes around every field. Always.
Necessary
This puts quotes around fields only when necessary.
They are necessary when fields contain a quote, delimiter or record terminator. Quotes are also necessary when writing an empty record (which is indistinguishable from a record with one empty field).
This is the default.
NonNumeric
This puts quotes around all fields that are non-numeric. Namely, when writing a field that does not parse as a valid float or integer, then quotes will be used even if they aren’t strictly necessary.
Never
This never writes quotes, even if it would produce invalid CSV data.
Trait Implementations§
§impl Clone for QuoteStyle
impl Clone for QuoteStyle
§fn clone(&self) -> QuoteStyle
fn clone(&self) -> QuoteStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more