Reference
API reference for the Mudrit PDF-signing SDK — entry points, SignConfig, placement, appearance, timestamps, and PAdES, field by field
This section documents the public API precisely as shipped: every struct field, builder method, and enum variant, with its type and default. For narrative explanations of why and when to use something, see Concepts and Guides; for runnable examples, see the Cookbook.
Three crates, one import
Mudrit is a Cargo workspace of three independently-usable crates — mudrit-keystore (key
management), mudrit-pdfsign (the PDF signing engine, the subject of most of this reference), and
mudrit (an all-in-one facade that re-exports both). See
Architecture for the full picture.
Each crate ships a prelude module that pulls its common API into scope in one import:
use mudrit::prelude::*; // facade — Signer, SignConfig, sign_pdf, backends, …
use mudrit_pdfsign::prelude::*; // engine crate, when working one layer downPrefer mudrit::prelude::* in application code; use mudrit_pdfsign::prelude::* when depending on
the engine crate directly (no bundled backends).
How this reference is organized
Signing entry points
sign_pdf, sign_file, sign_pdf_reported, PdfReader, add_document_timestamp, add_locked_signature, SigSize.
SignConfig
Every SignConfig field and every SignConfigBuilder method, with defaults.
Placement
Rect, PageSelector, Placement, and resolve_placements.
Signature model
Method (Single / MultiShared / MultiChained) and Certify (DocMDP levels).
Appearance
Appearance, RenderMode, Layout, Direction, SigField, Labels, Std14, Border, FontSource, Image.
Timestamps
Timestamp, UrlTimestamper, the Timestamper trait, DEFAULT_TSA_URL.
PAdES
PadesLevel (B-B / B-T / B-LT / B-LTA) and what each level auto-enables.
The full generated reference
This site covers the shapes that matter most day-to-day. The exhaustive, always-in-sync API
reference — every public item, every doc comment, every trait impl — is generated straight from the
source by rustdoc; it is not hand-maintained here.
Two-layer docs
Narrative + hand-picked reference (this Fumadocs site) alongside a generated API reference (rustdoc) is the standard pattern for a Rust SDK. Keep them separate and link between them.
Generate it locally
# All public items across the workspace, with all features, opened in your browser:
cargo doc --workspace --all-features --no-deps --openDrop --all-features to document only the features you use, or target one crate:
cargo doc -p mudrit-keystore --features winstore,pkcs11-picker --no-deps --openPublish it alongside this site
The generated HTML lands in target/doc/. Host it as a sub-path of your docs site (for example at
/api/) so links from these pages resolve:
cargo doc --workspace --all-features --no-deps
# then copy target/doc/ into your deploy under /api/Mudrit is a licensed SDK, so the rustdoc reference is not on docs.rs. Generate it from your
licensed source with the command above and host the target/doc/ output privately (for example
behind your internal docs), or read the in-site reference pages here.