Comments
The Rust compiler comes bundled with rustdoc, a tool for generating
documentation from comments in the code.
- Lines starting with
//are implementation comments and are omitted from the generated documentation. - Lines starting with
///are considered documentation comments. - Lines starting with
//!are module-level or crate-level documentation. Such comments may only appear at the beginning of a file or above a module. Using it other places is treated as an error.
Documentation comments attached to IDL definitions are emitted using ///
style comments. Module-level comments are currently not emitted in the
generated code.
IDL comments that are denoted by // should be omitted from the generated code
for the sake of brevity.