Expand description
Rendering & extension protocols.
Port of upstream rich/protocol.py + rich/abc.py + the highlighter
interface. These traits are the sanctioned extension points of the port.
Extensions in rich-ext (and, later, third-party plugins) implement them;
the faithful core only ever ships upstream’s built-in implementations. See
docs/PLUGINS.md.
Traits§
- Highlighter
- A transformer that adds style spans to
Text(e.g. syntax/number/URL highlighting). The Rust equivalent of upstream’sHighlighterABC. - Line
Renderable - Optional line-streaming extension point for renderables.
- Owned
Table Rows - Transfer already-owned table rows without cloning every cell string.
- Renderable
- Anything that can be rendered to a stream of
Segments within a width.