Struct dcsv::Reader

source · []
pub struct Reader { /* private fields */ }
Expand description

Csv Reader

User can set various reader option to configure a reading behaviour. Reader’s options are not dropped after a read but persists for reader’s lifetime.

Implementations

Build with reader option

Consumes double quote in csv file

Ignore empty rows

This prevents reader from panicking on empty row.

Trim all read values

Whether csv data has header or not

Set custom header

This will override “has_header” option and create header from given values.

Clear reader option and set to default

Use given delimiter instead of default one : “,”.

Use given line delimiter instead of default one : “\n, \r\n”.

Only default state will detect both “\n” and “\r\n”. If you set “\n” manually, “\r\n” will be ignored.

Read csv value from buf read stream

This returns read value as virtual data struct

Read csv value from buf read stream

This returns read value as virtual array struct

Trait Implementations

Returns the “default value” for a type. Read more

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.