Module termwiz::cell

source ·
Expand description

Model a cell in the terminal display

Re-exports

Structs

Models the contents of a cell on the terminal display
Holds the attributes for a cell. Most style attributes are stored internally as part of a bitfield to reduce per-cell overhead. The setter methods return a mutable self reference so that they can be chained together.

Enums

Models a change in the attributes of a cell in a stream of changes. Each variant specifies one of the possible attributes; the corresponding value holds the new value to be used for that attribute.
Specify whether you want to slowly or rapidly annoy your users
The Intensity of a cell describes its boldness. Most terminals implement Intensity::Bold by either using a bold font or by simply using an alternative color. Some terminals implement Intensity::Half as a dimmer color variant.
Describes the semantic “type” of the cell. This categorizes cells into Output (from the actions the user is taking; this is the default if left unspecified), Input (that the user typed) and Prompt (effectively, “chrome” provided by the shell or application that the user is interacting with.
Specify just how underlined you want your Cell to be

Constants

Functions

Returns the number of cells visually occupied by a grapheme. The input string must be a single grapheme.
Returns the number of cells visually occupied by a sequence of graphemes. Calls through to grapheme_column_width for each grapheme and sums up the length.