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.
- doc_file: PathBuf
The path to directive’s documentation file
- file_directives: FileDirectives
The directives within the crate’s document file.
Implementations
- impl CrateDirective
Variables
- const DIRECTIVE_NAME: &'static str
Functions
- fn filter_items(&mut self, max_visibility: &DirectiveVisibility) -> Vec<Directive>
Filter out items that will not be documented due to visibility restrictions.
The function goes through all modules and identifies items that will not be documented due to the configured visibility. As part of the filtering, it will also identify any re-exports that should be inlined.
- Returns:
A vec of directives that will not be documented.
- fn identify_impl_parents(&mut self)
Collect all impl directive and move them under appropriate parent.
The new parent for the impl directive is the struct or enum that is its self type, or the trait that is being implemented. If both the self type and trait are in the crate, the self type is preferred as the parent.
- fn new(rc: &RuntimeConfiguration, source_code_file: &SourceCodeFile) -> Self
Create a new
CrateDirectivefor the crate from the source file.
Traits implemented
- impl RstDirective for CrateDirective
Functions
- fn get_rst_text(self, level: usize, max_visibility: &DirectiveVisibility) -> Vec<String>
- impl MdDirective for CrateDirective
Functions
- fn fence_size(&self) -> usize
- fn get_md_text(self, fence_size: usize, max_visibility: &DirectiveVisibility) -> Vec<String>
- impl FileTopLevelDirective for CrateDirective
Functions
- fn get_doc_file(&self) -> &Path
- fn get_text(self, format: &Format, max_visibility: &DirectiveVisibility) -> Vec<String>