Struct csv_sniffer::Sniffer [] [src]

pub struct Sniffer { /* fields omitted */ }

A CSV sniffer.

The sniffer examines a CSV file, passed in either through a file or a reader.

Methods

impl Sniffer
[src]

[src]

Create a new CSV sniffer.

[src]

Specify the delimiter character.

[src]

Specify the header type (whether the CSV file has a header row, and where the data starts).

[src]

Specify the quote character (if any), and whether two quotes in a row as to be interepreted as an escaped quote.

[src]

The size of the sample to examine while sniffing. If using SampleSize::Records, the sniffer will use the value provided with terminator() (or Terminator::CRLF if no terminator is provided). Thus, SampleSize::Records may work unexpectedly for non-CRLF-terminated files if the terminator is not provided.

The sample size defaults to SampleSize::Bytes(4096).

[src]

Sniff the CSV file located at the provided path, and return a Reader (from the csv crate) ready to ready the file.

Fails on file opening or readering errors, or on an error examining the file.

[src]

Sniff the CSV file provided by the reader, and return a csv Reader object.

Fails on file opening or readering errors, or on an error examining the file.

[src]

Sniff the CSV file located at the provided path, and return a Metadata object containing information about the CSV file.

Fails on file opening or readering errors, or on an error examining the file.

[src]

Sniff the CSV file provider by the reader, and return a Metadata object containing information about the CSV file.

Fails on file opening or readering errors, or on an error examining the file.

Trait Implementations

impl Debug for Sniffer
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for Sniffer
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Sniffer

impl Sync for Sniffer