mod trait_directive
- module trait_directive
Implementation of the
rust:traitdirectiveStructs and Unions
- struct TraitDirective
Struct to hold details for documenting a trait.
- name: String
The full Rust path of the trait, used as the name of the directive.
- ident: String
The identifier for the trait.
- options: Vec<DirectiveOption>
The directive options to use.
- content: Vec<String>
The docstring for the trait.
- impls: Vec<ImplDirective>
Generic impls of the trait.
Implementations
- impl TraitDirective
Variables
- const DIRECTIVE_NAME: &'static str
Functions
- fn add_impl(&mut self, mut impl_: ImplDirective)
Add the impl directive to the trait.
The parent and visibility of the impl directive are updated along with the ownership.
- Args:
- impl_:
The
ImplDirectivefor the trait.
- fn change_parent(&mut self, new_parent: &str)
Change the parent module of the trait and its items.
- fn directive_visibility(&self) -> &DirectiveVisibility
Return the visibility of this directive.
Traits implemented
- impl RstDirective for TraitDirective
Functions
- fn get_rst_text(self, level: usize, max_visibility: &DirectiveVisibility) -> Vec<String>
- impl MdDirective for TraitDirective
Functions
- fn fence_size(&self) -> usize
- fn get_md_text(self, fence_size: usize, max_visibility: &DirectiveVisibility) -> Vec<String>