Struct tanmatsu::Terminal[][src]

pub struct Terminal<'a> {
    pub stdout: BufWriter<StdoutLock<'a>>,
    pub size: Size,
    pub flush_count: usize,
    // some fields omitted
}

Fields

stdout: BufWriter<StdoutLock<'a>>size: Sizeflush_count: usize

Implementations

Reads an event. It also sets the new size if the terminal has been resized, hence a mutable borrow of self is required.

Sets the cursor to the top left corner.

Sets the cursor to point.

If possible, try to use the move_cursor_{}_by and move_cursor_{} methods instead for single operations.

Sets the cursor X-coordinate to x.

Sets the cursor Y-coordinate to y.

Changes the terminal’s foreground text color to hex_color.

hex_color must be a hexadecimal color such as "FF0000".

Changes the terminal’s background text color to hex_color.

hex_color must be a hexadecimal color such as FF0000.

Changes the terminal’s cursor color to hex_color.

hex_color must be a hexadecimal color such as FF0000.

A terminal with an io::Stdout inside.

Every program can have only a single instance for writing. The standard output stream is locked and no other instance can write.

Makes this terminal suitable for drawing and input.

Note that this does not do anything until [flush] is used.

Deinitializes the terminal back into its normal state.

Note that this does not do anything until [flush] is used.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.