A few things to note:
-
Read the RustDoc book. It's short and full of useful information. It also leaves out a few things.
-
By default,
rustdocwill look for eithermain.rsorlib.rsas a starting point for documents. -
It's normative to have each file start with a
//!block descriptor. For example:
#![feature(...)]
#![plugin(...)]
//! HappyFunProgram: A super happy fun program you should not taunt.
//!
//! The super happy fun program contains less than the federally
//! specified minimum of radioactive toxins and should only be enjoyed
//! with adult supervision and proper eye and clothing protection.
#[macro_use]
extern crate plutonium
...
pub mod games; // this will be documented
mod toxins; // this will NOT be documented- Only items marked as
pubwill be documented byrustdoc. This includesmodinclusions in main or lib, which may direct which modules or files are included in the output.