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

pub struct WriterBuilder { /* fields omitted */ }
Expand description

A CSV writer builder

Implementations

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<File> {
    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<W: Write>(self, writer: W) -> Writer<W>[src]

Create a new Writer

Trait Implementations

impl Debug for WriterBuilder[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for WriterBuilder[src]

fn default() -> Self[src]

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

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V