pub fn render_to_markdown(desc: &TypeDescription) -> Result<String, Error>
Expand description

Render a TypeDescription to a Markdown string

Example

    use type_description::AsTypeDescription;
    use type_description::render::render_to_markdown;

    let ty_desc = std::collections::HashMap::<String, Vec<String>>::as_type_description();
    let markdown = render_to_markdown(&ty_desc).unwrap();

    println!("{markdown}");

Renders:

Table of ’String => Array of ‘String’s’

Key: String, Values: Array of ’String’s

String

An UTF-8 string

Array of ’String’s

Array Elements of String