Skip to main content

Module protocol

Module protocol 

Source
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.

Structs§

TargetCapabilities
Immutable destination capabilities supplied by an extension. No detection or I/O.

Enums§

Support
Evidence for an optional output protocol; inference is not confirmation.

Traits§

ConsoleEnvironment
Attach/query a per-console immutable extension environment.
Highlighter
A transformer that adds style spans to Text (e.g. syntax/number/URL highlighting). The Rust equivalent of upstream’s Highlighter ABC.
LineRenderable
Optional line-streaming extension point for renderables.
OwnedTableRows
Transfer already-owned table rows without cloning every cell string.
RenderEnvironment
Optional context shared by nested renderables without changing their protocol.
Renderable
Anything that can be rendered to a stream of Segments within a width.