Expand description
Segment - the atomic rendering unit.
A Segment is a piece of text with a single style applied. The rendering
pipeline produces streams of segments that are then written to the terminal.
Structs§
- Control
Code - A control code with optional parameters.
- Segment
- The atomic unit of rendering.
Enums§
- Control
Type - Control codes for terminal manipulation.
Functions§
- adjust_
line_ length - Adjust line length by padding or truncating.
- align_
bottom - Align lines to the bottom of a given height.
- align_
middle - Align lines to the middle of a given height.
- align_
top - Align lines to the top of a given height.
- apply_
style - Apply styles to an iterator of segments.
- divide
- Divide segments at specified cell positions.
- line_
length - Get the total cell length of a line of segments.
- simplify
- Simplify segments by merging adjacent segments with identical styles.
- split_
lines - Split segments into lines at newline characters.