pub struct CsvReaderConfig {
pub delimiter: u8,
pub has_header: bool,
pub quote: u8,
pub escape: u8,
pub null_str: String,
}Expand description
Configuration for reading a CSV file.
Fields§
§delimiter: u8Field delimiter character (default: ,).
has_header: boolWhether the first row is a header row (default: true).
quote: u8Quote character (default: ").
escape: u8Escape character (default: \\).
null_str: StringString representation of NULL values (default: "" — empty string).
Implementations§
Source§impl CsvReaderConfig
impl CsvReaderConfig
Sourcepub fn from_options(options: &HashMap<String, String>) -> Self
pub fn from_options(options: &HashMap<String, String>) -> Self
Build a config from a HashMap<String, String> of COPY options.
Supported keys: HEADER, DELIM (or DELIMITER), QUOTE, ESCAPE, NULL.
Trait Implementations§
Source§impl Clone for CsvReaderConfig
impl Clone for CsvReaderConfig
Source§fn clone(&self) -> CsvReaderConfig
fn clone(&self) -> CsvReaderConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CsvReaderConfig
impl Debug for CsvReaderConfig
Auto Trait Implementations§
impl Freeze for CsvReaderConfig
impl RefUnwindSafe for CsvReaderConfig
impl Send for CsvReaderConfig
impl Sync for CsvReaderConfig
impl Unpin for CsvReaderConfig
impl UnsafeUnpin for CsvReaderConfig
impl UnwindSafe for CsvReaderConfig
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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