Skip to main content

Crate minus

Crate minus 

Source
Expand description

Terminal paging for static and streaming output.

Pager sends content and configuration to the pager. Feature-gated runner functions start either a streaming or preloaded session, while input exposes input customization.

Re-exports§

pub use search::SearchMode;search
pub use error::MinusError;
pub use state::PagerState;

Modules§

error
Public pager error types.
hooks
Pager lifecycle hooks. Callbacks run synchronously and block rendering and input.
input
Keyboard and mouse input classification.
screen
Provides functions for getting analysis of the text data inside minus.
searchsearch
Regex and incremental text search.
state
Runtime pager state.

Structs§

HighlightColors
HighlightStyles
LineNavigationsearch
Source-line maps and optional alternate source-numbered pager content.
Pager
Sends content and configuration commands to a running pager.
PromptContext
PromptLine
PromptSpan
PromptStyle
TocEntrysearch
A visible outline heading and its source location.

Enums§

ColorDepth
The maximum color depth accepted by the output terminal.
ExitStrategy
Determines whether exiting the pager also terminates the process.
LineNumbers
Controls line-number visibility and whether the user may toggle it.
PromptAttribute
PromptColor
PromptError
RunMode
Define the modes in which minus can run

Functions§

ansi256_to_rgb
Return the conventional RGB approximation of an ANSI palette entry.
dynamic_pagingdynamic_output
Runs a pager that accepts content and configuration updates.
dynamic_paging_in_placedynamic_output
Runs the dynamic pager inside the caller’s active terminal screen buffer.
page_allstatic_output
Pages preloaded content, writing it directly when paging is unnecessary.

Type Aliases§

ExitCallbacks
Exit callbacks invoked in registration order.
LayoutRenderersearch
Rebuilds content and source maps for the available document width. Runs synchronously while pager state is locked; must not call pager state APIs.
PromptRenderer
Runs synchronously while pager state is locked.
SourceViewRenderersearch
Produces source-numbered text and its source-line map when navigation begins.