Macro simple_mermaid::mermaid
source · macro_rules! mermaid { ($file:literal) => { ... }; ($file:literal left framed) => { ... }; ($file:literal framed left) => { ... }; ($file:literal center framed) => { ... }; ($file:literal framed center) => { ... }; ($file:literal right framed) => { ... }; ($file:literal framed right) => { ... }; ($file:literal framed) => { ... }; ($file:literal left) => { ... }; ($file:literal right) => { ... }; ($file:literal center) => { ... }; }
Expand description
Include a mermaid diagram in the documentation.
This macro is meant to be used as argument of the #[doc]
attribute.
/// Some documentation about a function
/// Then include a diagram:
#[doc = mermaid!("netflix.mmd")]
fn a_function() {}
This would produce:
Some documentation
Then include a diagram:
pie title NETFLIX "Time spent in menu" : 90 "Time watching content" : 10
Look at the crate level documentation for all the options.