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

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.

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.

Build a ReaderSource from a path.

If the file doesn’t exist or it is otherwise inaccesible returns an error.

Trait Implementations

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.