Struct mortal::terminal::TerminalWriteGuard[][src]

pub struct TerminalWriteGuard<'a>(_);

Holds an exclusive lock for write operations on a Terminal

See Terminal documentation for details on locking.

Methods

impl<'a> TerminalWriteGuard<'a>
[src]

Flush all output to the terminal device.

This is called automatically when the TerminalWriteGuard is dropped.

Returns the size of the terminal.

Clears the terminal screen, placing the cursor at the first line and column.

If the terminal contains a scrolling window over a buffer, the window will be scrolled downward, preserving as much of the existing buffer as possible.

Clears the current line, starting at cursor position.

Clears the screen, starting at cursor position.

Moves the cursor up n lines.

Moves the cursor down n lines.

Moves the cursor left n columns.

Moves the cursor right n columns.

Moves the cursor to the first column of the current line

Set the current cursor mode.

This setting is a visible hint to the user. It produces no change in behavior.

Notes

On some systems, this setting may have no effect.

Adds a set of Style flags to the current style setting.

Removes a set of Style flags from the current style setting.

Sets the current style to the given set of flags.

Sets the background text color.

Removes color and style attributes.

Adds bold to the current style setting.

Adds bold to the current style setting.

This is equivalent to self.add_style(Style::BOLD).

Adds italic to the current style setting.

This is equivalent to self.add_style(Style::ITALIC).

Adds underline to the current style setting.

This is equivalent to self.add_style(Style::UNDERLINE).

Adds reverse to the current style setting.

This is equivalent to self.add_style(Style::REVERSE).

Writes output to the terminal with the given color and style added.

All attributes are removed after the given text is written.

Writes a single character to the terminal using the current style and color settings.

Writes a string to the terminal using the current style and color settings.

Writes formatted text to the terminal using the current style and color settings.

This method enables TerminalWriteGuard to be used as the receiver to the write! and writeln! macros.

Auto Trait Implementations

impl<'a> !Send for TerminalWriteGuard<'a>

impl<'a> Sync for TerminalWriteGuard<'a>