Struct csv_sniffer::metadata::Dialect [] [src]

pub struct Dialect {
    pub delimiter: u8,
    pub header: Header,
    pub terminator: Terminator,
    pub quote: Quote,
    pub doublequote_escapes: bool,
    pub escape: Escape,
    pub comment: Comment,
    pub flexible: bool,
}

Dialect-level metadata. This type encapsulates the details to be used to derive a ReaderBuilder object (in the csv crate).

Not all components of this type are currently detected by the sniffer, and may be detected in the future.

Fields

CSV delimiter (field separator). Detected by sniffer.

Header subtype (header row boolean and number of preamble rows). Detected by sniffer.

Record terminator. Currently not detected by sniffer; defaults to Terminator::CRLF.

Record quoting details. Detected by sniffer.

Whether or not doubled quotes are interpreted as escapes. Currently not detected by sniffer; defaults to true.

Character used as escape, if any. Currently not detected by sniffer; defaults to Escape::Disabled (to escape a quote, use double quotes).

Character used as comment, if any. Currently not detected by sniffer; defaults to Comment::Disabled.

Whether or not the number of fields in a record is allowed to change. Detected by sniffer.

Methods

impl Dialect
[src]

[src]

Use this Dialect to open a file specified by provided path. Returns a Reader (from the csv crate). Fails on file opening or reading errors.

[src]

Use this Dialect to create a Reader (from the csv crate) using the provided reader. Fails if unable to read from the reader.

Trait Implementations

impl Clone for Dialect
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Dialect
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Debug for Dialect
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Dialect
[src]

[src]

Formats the value using the given formatter. Read more

impl From<Dialect> for ReaderBuilder
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Dialect

impl Sync for Dialect