pub struct Display<T: Tui> { /* private fields */ }
Expand description

A high level interface to the terminal display.

Implementations

Create a new display instance.

Draws a string of text to the terminal interface.

Errors

Will error if the underlying terminal interface is in an error state.

Clear the terminal interface and reset any style and color attributes.

Errors

Will error if the underlying terminal interface is in an error state.

Force a refresh of the terminal interface. This normally should be called after after all text has been drawn to the terminal interface. This is considered a slow operation, so should be called only as needed.

Errors

Will error if the underlying terminal interface is in an error state.

Set the color of text drawn to the terminal interface. This will only change text drawn to the terminal after this function call.

Errors

Will error if the underlying terminal interface is in an error state.

Set the style attributes of text drawn to the terminal interface. This will only change text drawn to the terminal after this function call.

Errors

Will error if the underlying terminal interface is in an error state.

Get the width and height of the terminal interface. This can be a slow operation, so should not be called unless absolutely needed.

Errors

Will error if the underlying terminal interface is in an error state.

Reset the cursor position to the start of the line.

Errors

Will error if the underlying terminal interface is in an error state.

Move the cursor position right characters from the end of the line.

Errors

Will error if the underlying terminal interface is in an error state.

Move the cursor to the next line.

Errors

Will error if the underlying terminal interface is in an error state.

Start the terminal interface interactions. This should be called before any terminal interactions are performed.

Errors

Will error if the underlying terminal interface is in an error state.

End the terminal interface interactions. This should be called after all terminal interactions are complete. This resets the terminal interface to the default state, and should be called on program exit.

Errors

Will error if the underlying terminal interface is in an error state.

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

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.