Struct csvsc::input::ReaderSource
source · [−]pub struct ReaderSource { /* private fields */ }
Expand description
Represents a file as source of CSV data.
Most of the time you won’t need to deal with this struct, except when you need to customize the CSV options.
Implementations
sourceimpl ReaderSource
impl ReaderSource
A source of data. Wraps a csv::Reader<File>
.
You might not ever need to build one of this objects yourself since most of
the time they’re built for you inside InputStream
constructors.
sourcepub fn from_reader<P: AsRef<Path>>(
reader: Reader<File>,
path: P
) -> ReaderSource
pub fn from_reader<P: AsRef<Path>>(
reader: Reader<File>,
path: P
) -> ReaderSource
Build a ReaderSource from a csv::Reader<File>
and a path.
the path
is added to every record as a virtual column with name
_source
.
Trait Implementations
sourceimpl From<Reader<File>> for ReaderSource
impl From<Reader<File>> for ReaderSource
sourcefn from(reader: Reader<File>) -> ReaderSource
fn from(reader: Reader<File>) -> ReaderSource
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for ReaderSource
impl Send for ReaderSource
impl Sync for ReaderSource
impl Unpin for ReaderSource
impl UnwindSafe for ReaderSource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more