Skip to content

rs_rich.ext.frame

Generated from the type stubs by scripts/gen_python_api.py; do not edit.

rs_rich.ext.frame: rendered results as frames (rich_ext::frame).

No Rich counterpart: this is the port's own rs-rich-ext crate. A Frame holds a render as rows of styled runs: its plain text, its cells (one per terminal column), the ANSI bytes the console writes for it, and a cell-level diff against a previous frame.

Frame module-attribute

Frame = RenderFrame

RenderFrame

rs_rich.ext.frame.Frame: a render as rows of styled runs (rich_ext::frame).

height property

height: int

width property

width: int

ends_with_newline property

ends_with_newline: bool

run_count property

run_count: int

style_count property

style_count: int

from_segments staticmethod

from_segments(segments: Iterable[Segment]) -> RenderFrame

from_console staticmethod

from_console(console: Console, renderable: Any, options: Optional[ConsoleOptions] = None) -> RenderFrame

row_width

row_width(row: int) -> int

row

row(row: int) -> List[Tuple[str, int, Optional[Style]]]

cells

cells(row: int) -> List[Tuple[str, int, Optional[Style]]]

plain

plain() -> str

to_ansi

to_ansi(console: Console) -> str

to_ansi_merged

to_ansi_merged(console: Console) -> str

encode

encode(color_system: Optional[str] = 'truecolor', no_color: bool = False) -> str

encode_span

encode_span(row: int, start: int, end: int, color_system: Optional[str] = 'truecolor', no_color: bool = False) -> str

merged

merged() -> RenderFrame

diff

diff(previous: RenderFrame) -> List[Tuple[int, range]]