Module cell

Source
Expand description

Model a cell in the terminal display

Re-exports§

Structs§

Cell
Models the contents of a cell on the terminal display
CellAttributes
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.
UnicodeVersion

Enums§

AttributeChange
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.
Blink
Specify whether you want to slowly or rapidly annoy your users
Intensity
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.
Presentation
SemanticType
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.
Underline
Specify just how underlined you want your Cell to be
VerticalAlign

Constants§

LATEST_UNICODE_VERSION

Functions§

grapheme_column_width
Returns the number of cells visually occupied by a grapheme. The input string must be a single grapheme.
is_white_space_char
Returns true if the char c has the unicode White_Space property
is_white_space_grapheme
Returns true if the grapheme string g consists entirely of characters that have the unicode White_Space property.
unicode_column_width
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.