Struct glint::term_buffer::TermBuffer[][src]

pub struct TermBuffer { /* fields omitted */ }
Expand description

Represents a range of lines in a terminal and the cursor position. This is suitable when you don’t want to use an “alternate screen”, but rather retain previous terminal output, such as shell prompts/responses.

New frames are rendered by replacing the lines. All operations work on a relative coordinate system where (0, 0) is the top-left corner of the lines TermBuffer controls.

Further, we never check the actual cursor position, but rather move the cursor relative to its current position. The meaning of (0, 0) is actually the cursor position when TermBuffer first renders.

Implementations

Add a row to the desired output

Positions the cursor where (0, 0) is the first character printed by this program

This causes us to skip past the currently displayed buffer area and forget about it, resulting in future renders to happen below it. If this is called, and then the TermBuffer is dropped, the default behavior of clearing the area will be a no-op.

Perform the necessary update to the terminal. This may choose a more optimized update than a full frame.

Renders a complete frame to the terminal

Trait Implementations

Returns the “default value” for a type. Read more

Executes the destructor for this type. 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.