Function fetch_local_docs

Source
pub fn fetch_local_docs(
    crate_name: &str,
    item_path: Option<&str>,
) -> Result<String>
Expand description

Builds and fetches Rust documentation locally and converts it to Markdown.

§Arguments

  • crate_name - The name of the crate to fetch documentation for
  • item_path - Optional path to a specific item within the crate

§Returns

The documentation as Markdown text.

§Examples

use rustdoc_text::fetch_local_docs;

let docs = fetch_local_docs("serde", None)?;
println!("{}", docs);