mod crate_directive
- module crate_directive
Implementation of the
rust:cratedirective.Structs and Unions
- struct CrateDirective
Struct to hold data required for documenting a crate.
- name: String
The name of the crate.
- options: Vec<DirectiveOption>
The options for the crate directive.
- content: Vec<String>
The docstring for the crate’s lib.rs file.
- items: Vec<Directive>
The items within the crate’s lib.rs file.
Impls
- impl CrateDirective
- const DIRECTIVE_NAME: &'static str
- fn new(name: &str, ast: &File) -> CrateDirective
Create a new
CrateDirectivefor the crate from the source file.The generated documentation produces a
rust:cratedirective.- Args:
- crate_name:
The name of the crate.
- ast:
Reference to
syn::Filestruct from parsing the crate’slib.rsfile.