pub struct CsvReader { /* private fields */ }Expand description
Builder for CSV reader sessions that reuses schema inference results.
Implementations§
Source§impl CsvReader
impl CsvReader
pub fn new(options: CsvReadOptions) -> Self
pub fn with_options(options: CsvReadOptions) -> Self
pub fn options(&self) -> &CsvReadOptions
pub fn options_mut(&mut self) -> &mut CsvReadOptions
pub fn into_options(self) -> CsvReadOptions
Sourcepub fn infer_schema(&self, path: &Path) -> CsvResult<SchemaRef>
pub fn infer_schema(&self, path: &Path) -> CsvResult<SchemaRef>
Infer a schema from the file without fully streaming its contents.
Sourcepub fn open(&self, path: &Path) -> CsvResult<CsvReadSession>
pub fn open(&self, path: &Path) -> CsvResult<CsvReadSession>
Create a streaming read session that yields Arrow record batches.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CsvReader
impl RefUnwindSafe for CsvReader
impl Send for CsvReader
impl Sync for CsvReader
impl Unpin for CsvReader
impl UnwindSafe for CsvReader
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 more