Skip to main content

Crate mant_core

Crate mant_core 

Source
Expand description

Manual source, query, and output engine independent from its process hosts.

Structs§

AvailableDocument
One document discoverable by name through the ordinary query boundary.
DocumentResolver
One explicit local document-environment snapshot.
ManualIndex
Immutable index shared by discovery and exact manual lookup.
ManualPage
One effective local manual page after path and locale precedence.
ManualRequest
One validated manual lookup independent from CLI token syntax.
MarkdownOptions
Markdown serialization controls that do not alter the query AST.
ParsedMarkdown
Complete result of parsing one ManT-flavoured Markdown input.
QueryPolicy
Input-resolution policy kept outside the serialized request contract.
SelectorCandidate
One stable qualification offered when a semantic alias is ambiguous.
TldrPageLocation
Source identity attached to a parsed tldr page.

Enums§

AvailableDocumentKind
Source family used to resolve one available document.
AvailableDocumentOrigin
Precedence class and storage family for one available document.
HostPlatform
Native host families supported by ManT distributions.
LocateError
Expected source-discovery failures suitable for a user-facing CLI error.
ManualError
Failure produced by ManT’s source policy or by the underlying roff parser.
ManualErrorKind
Stable category for a native manual failure.
ManualLoadError
Native-manual resolution or lowering failed after candidate selection.
MarkdownParseError
Invalid structure in ManT’s optional top-level Markdown extension.
ProjectionError
Failure to derive an addressable view from a complete query.
QueryError
A query cannot produce either authoritative manual content or a quick reference.
QueryExecutionError
A valid request could not be loaded or projected.
QueryViewResult
Materialized result of the view carried by a QueryRequest.
SearchError
Invalid search input or matcher construction.
TldrCacheError
Offline cache discovery or page-read failure.
TldrDirectiveError
TldrParseError
A tldr page lacks the minimum structure required by the contract.
TldrUpdateError
Failure to refresh an installed client or ManT’s private checkout.

Constants§

MAX_MANUAL_BYTES
Upper bound on both the stored and decoded form of one manual source chain.
MAX_MARKDOWN_BYTES
Upper bound on a single Markdown source, shared by every input path.

Functions§

build_outline
Build a block-free, addressable outline for one complete query.
build_outline_with_detail
Build an outline with optional semantic definition entries.
discover_manual_roots
Discover manual roots from explicit variables and platform conventions.
execute_query
Load and materialize the view encoded in one native request.
get_system_tldr_cache_dirs
Return known installed-client cache roots in priority order.
get_tldr_cache_dir
Resolve the ManT-owned fallback checkout for an explicit environment.
get_tldr_languages
Resolve locale candidates, retaining first occurrence priority.
get_tldr_platforms
Resolve host, common, then cross-platform fallback page directories.
get_tldr_read_cache_dirs
Select installed-client caches followed by ManT’s private fallback.
list_available_documents
List every registered document candidate and locally indexed manual page.
locate_manual_source_in
Locate a manual in an explicit immutable index.
lower_mandoc_document
Convert a completed low-level parse into the stable document contract.
native_api_version
Reports the native contract version through the engine layer.
normalize_tldr_topic
Convert a multi-word query to the tldr filename convention.
parse_manual_page
Parse an indexed manual, resolving .so redirects against its discovered manual hierarchy without falling back to the process working directory.
parse_manual_source
Parse and normalize one standalone man or mdoc source file.
parse_markdown
Split ManT’s optional leading tldr preface from the Markdown document.
parse_tldr_command
Parse the tldr placeholder extension and choose the long option variant.
parse_tldr_page
Parse one tldr Markdown page without performing any I/O.
project_query_view
Materialize one view from an already loaded query.
query_markdown_text
Parse in-memory Markdown for the direct mant - command.
read_cached_tldr_page
Read one cached tldr page using current host conventions; never updates it.
render_excerpt_json
Serialize selected query nodes in compact or human-readable form.
render_excerpt_markdown
Render selected query nodes with their outline context.
render_excerpt_markdown_with_options
Render selected nodes using explicit presentation-only options.
render_excerpt_text
Render selected query nodes as unstyled text with outline context.
render_markdown
Render a complete query as clean Markdown without a trailing newline.
render_markdown_with_options
Render a complete query using explicit presentation-only options.
render_outline_json
Serialize a complete query outline in compact or human-readable form.
render_outline_markdown
Render a complete query outline as a nested CommonMark list.
render_outline_text
Render a complete query outline as a copyable Unicode tree.
render_query_json
Serialize a query contract in compact or human-readable form.
render_query_man
Render the manual as man(1)-faithful plain text.
render_query_text
Render a complete query without Markdown or terminal escape sequences.
render_search_json
Serialize structure-aware search results in compact or human-readable form.
render_search_markdown
Render a readable Markdown report whose coordinates target the full page.
render_search_text
Render grep-like results with stable Markdown coordinates and node paths.
render_update_json
Serialize the explicit tldr update result for a process boundary.
resolve_query
Query the local man database and optional offline tldr caches.
resolve_query_with_policy
Query with an explicit input-resolution policy.
search_query
Search one complete query and report coordinates in its canonical Markdown.
select_excerpt
Select tldr, document-root content, or complete section subtrees by path or ID.
select_explanation
Select exactly one semantic entry by stable path, ID, or alias.
update_tldr_cache
Refresh tldr through an installed client or ManT’s private Git checkout.
validate_query_request
Validate all request and policy invariants before local I/O.
validate_search_query
Validate search limits and compile its matcher without loading a manual.