Crate docima[][src]

Expand description

docima

The functions are intended to be called from the build script

Usage

  1. Configure your build script to generate the images in the desired path.
    generate_image(
       my_image_generator_function,
       600,
       400,
       "images/image01.html",
       "the alt-text attribute",
       "the title attribute",
       "div",
    )?;
  1. Include your image in the docs by using the doc attribute and the include_str macro.
#[doc = include_str!("../images/my_image.html") ]
  1. Generate the docs:
cargo doc --open

See also the full provided example.

Enums

The docima Error type.

Functions

Writes an image file as an HTML tag with base64 encoded png data, generated by a custom function.

Type Definitions

The docima Result type.

A standard Result type.