Documentation examples styles
withoutboats opened this issue · comments
Proposing the following norms for documentation (which mostly matches what we've done so far):
- Methods only include statements, function signatures are hidden.
- Type and module level examples include function signatures, but no
main
function. - Main function in examples,
lib.rs
, and README. - Nothing is shown as visibly imported unless its used in the visible code.
- No
::std
visible in docs; if its used in the shown part of the doc, its imported.
These norms sound good to me!