[][src]Struct arrow::csv::writer::WriterBuilder

pub struct WriterBuilder { /* fields omitted */ }

A CSV writer builder

Methods

impl WriterBuilder[src]

pub fn new() -> Self[src]

Create a new builder for configuring CSV writing options.

To convert a builder into a writer, call WriterBuilder::build

Example

extern crate arrow;

use arrow::csv;
use std::fs::File;

fn example() -> csv::Writer {
    let file = File::create("target/out.csv").unwrap();

    // create a builder that doesn't write headers
    let builder = csv::WriterBuilder::new().has_headers(false);
    let writer = builder.build(file);

    writer
}

pub fn has_headers(self, has_headers: bool) -> Self[src]

Set whether to write headers

pub fn with_delimiter(self, delimiter: u8) -> Self[src]

Set the CSV file's column delimiter as a byte character

pub fn with_date_format(self, format: String) -> Self[src]

Set the CSV file's date format

pub fn with_time_format(self, format: String) -> Self[src]

Set the CSV file's time format

pub fn with_timestamp_format(self, format: String) -> Self[src]

Set the CSV file's timestamp format

pub fn build(self, file: File) -> Writer[src]

Create a new Writer

Trait Implementations

impl Default for WriterBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> FromCast<T> for T[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]