Skip to main content

docsrs_cli/render/
mod.rs

1//! Markdown and JSON rendering with output truncation.
2//!
3//! Split by responsibility, with the public API re-exported unchanged so every
4//! consumer keeps importing from `crate::render::*`:
5//!
6//! - [`envelope`] — typed success / dry-run / error JSON envelopes
7//! - [`markdown`] — human Markdown per command payload
8//! - [`budget`] — `max_output_bytes` truncation and hit-list shrinking
9//! - [`schema_md`] — Markdown rendering of the embedded JSON Schemas
10
11pub mod budget;
12pub mod envelope;
13pub mod markdown;
14pub mod schema_md;
15
16pub use budget::{
17    apply_output_budget_search_crates, apply_output_budget_search_in_crate,
18    apply_truncation_to_item, apply_truncation_to_readme, truncate_output,
19};
20pub use envelope::{
21    DryRunData, DryRunEnvelope, ErrorBody, ErrorEnvelope, SuccessEnvelope, dry_run_envelope,
22    error_envelope, success_envelope, success_envelope_with_ok, usage_error,
23};
24pub use markdown::{
25    render_item_markdown, render_readme_markdown, render_search_in_crate_markdown,
26    render_search_markdown,
27};
28pub use schema_md::render_schema_markdown;