pub struct CsvReaderOptions {
pub delimiter: u8,
pub has_headers: bool,
pub skip_rows: usize,
pub max_rows: Option<usize>,
pub infer_types: bool,
}Expand description
CSV Reader options
Fields§
§delimiter: u8Delimiter character (comma, tab, etc.)
has_headers: boolWhether the file has a header row
skip_rows: usizeSkip N rows from the beginning
max_rows: Option<usize>Maximum rows to read (None = read all)
infer_types: boolAutomatically infer types
Implementations§
Source§impl CsvReaderOptions
impl CsvReaderOptions
Sourcepub fn with_delimiter(self, delimiter: u8) -> Self
pub fn with_delimiter(self, delimiter: u8) -> Self
Set delimiter
Sourcepub fn with_headers(self, has_headers: bool) -> Self
pub fn with_headers(self, has_headers: bool) -> Self
Set whether file has headers
Sourcepub fn with_skip_rows(self, skip_rows: usize) -> Self
pub fn with_skip_rows(self, skip_rows: usize) -> Self
Set number of rows to skip
Sourcepub fn with_max_rows(self, max_rows: usize) -> Self
pub fn with_max_rows(self, max_rows: usize) -> Self
Set maximum rows to read
Sourcepub fn with_infer_types(self, infer_types: bool) -> Self
pub fn with_infer_types(self, infer_types: bool) -> Self
Set type inference
Trait Implementations§
Source§impl Clone for CsvReaderOptions
impl Clone for CsvReaderOptions
Source§fn clone(&self) -> CsvReaderOptions
fn clone(&self) -> CsvReaderOptions
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 CsvReaderOptions
impl Debug for CsvReaderOptions
Auto Trait Implementations§
impl Freeze for CsvReaderOptions
impl RefUnwindSafe for CsvReaderOptions
impl Send for CsvReaderOptions
impl Sync for CsvReaderOptions
impl Unpin for CsvReaderOptions
impl UnwindSafe for CsvReaderOptions
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