Skip to main content

Module segment

Module segment 

Source
Expand description

Segments — the atoms of rendering.

Port of upstream rich/segment.py. A Segment is a piece of text with an optional Style. Everything renderable ultimately becomes a stream of segments, which the Console turns into bytes.

Control-code segments carry a control flag; the typed control sequences that populate them live in control.

Structs§

Segment
A span of text with an optional style. Mirrors rich.segment.Segment.