pub struct CsvOptions {
pub has_header: bool,
pub delimiter: Option<u8>,
pub batch_size: usize,
pub schema: Option<Schema>,
}Expand description
Options for CSV parsing.
Fields§
§has_header: boolWhether the CSV file has a header row.
delimiter: Option<u8>Delimiter character (default is comma).
batch_size: usizeBatch size for reading.
schema: Option<Schema>Optional schema (inferred if not provided).
Implementations§
Source§impl CsvOptions
impl CsvOptions
Sourcepub fn with_header(self, has_header: bool) -> Self
pub fn with_header(self, has_header: bool) -> Self
Sets whether the file has a header row.
Sourcepub fn with_delimiter(self, delimiter: u8) -> Self
pub fn with_delimiter(self, delimiter: u8) -> Self
Sets the delimiter character.
Sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Sets the batch size for reading.
Sourcepub fn with_schema(self, schema: Schema) -> Self
pub fn with_schema(self, schema: Schema) -> Self
Sets the schema for parsing.
Trait Implementations§
Source§impl Clone for CsvOptions
impl Clone for CsvOptions
Source§fn clone(&self) -> CsvOptions
fn clone(&self) -> CsvOptions
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 CsvOptions
impl Debug for CsvOptions
Auto Trait Implementations§
impl Freeze for CsvOptions
impl RefUnwindSafe for CsvOptions
impl Send for CsvOptions
impl Sync for CsvOptions
impl Unpin for CsvOptions
impl UnsafeUnpin for CsvOptions
impl UnwindSafe for CsvOptions
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> 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 moreCreates a shared type from an unshared type.