Struct stijl::TermStream [] [src]

pub struct TermStream<T> { /* fields omitted */ }

A styled stream using terminfo escape sequences.

Instances are lightweight, using only four escape sequences (instead of copying entire terminfo descriptions).

Methods

impl TermStream<Stdout>
[src]

[src]

A TermStream that wraps std::io::stdout(), using the current terminal description.

impl TermStream<Stderr>
[src]

[src]

A TermStream that wraps std::io::stderr(), using the current terminal description.

Trait Implementations

impl LockableStream for TermStream<Stdout>
[src]

[src]

Lock the stream, returning a writable guard.

impl LockableStream for TermStream<Stderr>
[src]

[src]

Lock the stream, returning a writable guard.

impl<T: Write> Write for TermStream<T>
[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

impl<T: Write> Stream for TermStream<T>
[src]

The Stream methods of this implementation may return anErr(Error) if there is an I/O error writing to the wrapped stream, or if the TermStream object was created from a broken terminfo description with invalid escape sequences.

[src]

Sends the sgr0 escape sequence.

[src]

Sends the setaf escape sequence.

[src]

Sends the bold, smul, or smso escape sequence (depending on which is supported by the terminfo description).

[src]

True if the stream is connected to a command-line interface.

impl CLIStream for TermStream<Stdout>
[src]

[src]

"Rewind" the stream so that the last count lines can be overwritten. Read more

[src]

The size of the command-line window. Read more

impl CLIStream for TermStream<Stderr>
[src]

[src]

"Rewind" the stream so that the last count lines can be overwritten. Read more

[src]

The size of the command-line window. Read more

impl<'a> CLIStream for TermStream<StdoutLock<'a>>
[src]

[src]

"Rewind" the stream so that the last count lines can be overwritten. Read more

[src]

The size of the command-line window. Read more

impl<'a> CLIStream for TermStream<StderrLock<'a>>
[src]

[src]

"Rewind" the stream so that the last count lines can be overwritten. Read more

[src]

The size of the command-line window. Read more