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.
CommandOutput
Minimal subprocess result shared by external data update operations.
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.
RegisteredDocument
One Markdown document explicitly registered in ManT’s document namespace.
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.
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.
RegisteredDocumentOrigin
Precedence class for one registered Markdown document.
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_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.
find_registered_document
Find the highest-precedence registered Markdown document for document.
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 effective registered document and locally indexed manual page.
list_registered_documents
List effective registered documents after applying directory precedence.
locate_manual_source
Locate a manual through the process-wide native index.
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_source
Parse and normalize one located 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.
query
Query the local man database and optional offline tldr caches.
query_markdown_text
Parse in-memory Markdown for the direct mant - command.
query_with_policy
Query with an explicit input-resolution policy.
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.
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.
system_manual_index
Build or retrieve the process-wide native manual index.
update_tldr_cache
Refresh tldr through an installed client or ManT’s private Git checkout.
validate_search_query
Validate search limits and compile its matcher without loading a manual.