pub struct TerminalWriteGuard<'a>(_);
Expand description

Holds an exclusive lock for write operations on a Terminal

See Terminal documentation for details on locking.

Implementations

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 all attributes for the terminal.

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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.