Expand description
Output pager for displaying large result sets.
Two modes:
- Batch (
page_content): write all content to temp file, open with pager. - Streaming (
page_stream): pipe rows directly tolessstdin.lessstores received bytes in its own internal buffer and allows full backward scrolling. Data appears as it arrives; no polling required.
Pager resolution order:
$PAGERenvironment variable (pipe mode — custom pager gets stdin)lesswith stdin pipe (less -R -S)moreas fallback (pipe mode)- Error if nothing available
Structs§
- Pager
Writer - A writable handle that streams rows to a pager.
Functions§
- page_
content - page_
stream - Spawn a pager for streaming output, returning a
PagerWriterto write rows into.