Skip to main content

Crate libmandoc_rs

Crate libmandoc_rs 

Source
Expand description

Safe ownership boundary around the pinned libmandoc parser.

The C shim completes and copies a parse before returning. Rust therefore never observes libmandoc’s private roff_node layout, and the global C parser state is serialized inside this crate.

Structs§

Diagnostic
One non-fatal finding emitted while parsing a manual source.
Document
Complete owned output of the low-level parser, excluding diagnostics.
Metadata
Metadata copied from a completed libmandoc parse.
Node
An owned syntax node with no pointers into the C parser.
NodeFlags
Source and renderer flags needed by a lowering or rendering pass.
ParseError
File-level failure reported without leaking C or runtime diagnostics.
ParseOptions
Configuration for one Parser instance.
ParseReport
Completed owned document and any non-fatal parser findings.
Parser
Reusable parser with an explicit input policy.
SourceLocation
Optional source location extracted from a libmandoc diagnostic prefix.
TableCell
Owned payload of one cell in a libmandoc table row.

Enums§

Compression
How the parser receives a manual source’s top-level compression.
DiagnosticLevel
Severity assigned by libmandoc’s validation diagnostics.
DisplayKind
Whether an mdoc display preserves source line layout.
IncludePolicy
Policy controlling whether .so requests may resolve files.
MacroSet
High-level macro package detected by libmandoc.
NodeKind
Renderer-neutral node role copied from the libmandoc syntax tree.
NormalizedListKind
Normalized mdoc list behavior copied independently of upstream enum values.
ParseErrorKind
Categorizes a source-level failure without exposing C implementation details.
TableAlignment
Horizontal alignment retained for one parsed tbl(7) cell.

Constants§

LIBMANDOC_VERSION
Pinned upstream version compiled by this crate’s build script.