doku 0.21.1

A framework for documenting Rust data structures
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::prelude::*;

#[derive(Document)]
enum GenericEnum<'a, T1, T2, const N: usize> {
    A,
    B(T1),
    C(T2),
    D(&'a str),
    E([u32; N]),
}

printer_test! {
    "output.numbers.json" => to_json(GenericEnum<'static, u32, u64, 3>),
    "output.strings.json" => to_json(GenericEnum<'static, String, String, 4>),
    "output.numbers.toml" => to_toml(GenericEnum<'static, u32, u64, 3>),
    "output.strings.toml" => to_toml(GenericEnum<'static, String, String, 4>),
}