Struct tabwriter::TabWriter [] [src]

pub struct TabWriter<W> { /* fields omitted */ }

TabWriter wraps an arbitrary writer and aligns tabbed output.

Elastic tabstops work by aligning contiguous tabbed delimited fields known as column blocks. When a line appears that breaks all contiguous blocks, all buffered output will be flushed to the underlying writer. Otherwise, output will stay buffered until flush is explicitly called.

Methods

impl<W: Write> TabWriter<W>
[src]

Important traits for TabWriter<W>
[src]

Create a new TabWriter from an existing Writer.

All output written to Writer is passed through TabWriter. Contiguous column blocks indicated by tabs are aligned.

Note that flush must be called to guarantee that TabWriter will write to the given writer.

Important traits for TabWriter<W>
[src]

Set the minimum width of each column. That is, all columns will have at least the size given here. If a column is smaller than minwidth, then it is passed with spaces.

The default minimum width is 2.

Important traits for TabWriter<W>
[src]

Set the padding between columns. All columns will be separated by at least the number of spaces indicated by padding. If padding is zero, then columns may run up against each other without any separation.

The default padding is 2.

[src]

Unwraps this TabWriter, returning the underlying writer.

This internal buffer is flushed before returning the writer. If the flush fails, then an error is returned.

Trait Implementations

impl<W: Debug> Debug for TabWriter<W>
[src]

[src]

Formats the value using the given formatter. Read more

impl<W: Write> Write for TabWriter<W>
[src]

[src]

Write a buffer into this object, returning how many bytes were written. Read more

[src]

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

1.0.0
[src]

Attempts to write an entire buffer into this write. Read more

1.0.0
[src]

Writes a formatted string into this writer, returning any error encountered. Read more

1.0.0
[src]

Creates a "by reference" adaptor for this instance of Write. Read more

Auto Trait Implementations

impl<W> Send for TabWriter<W> where
    W: Send

impl<W> Sync for TabWriter<W> where
    W: Sync