mod function_directive
- module function_directive
Implementation of the
rust:functiondirectiveMacros
- macro func_from_item
DRY macro to parse the different item types.
Functions
- fn nodes_for_fn_signature(signature: &Signature) -> Vec<Node>
Generate docutils node layout for the function from its signature
Structs and Unions
- struct FunctionDirective
Struct to hold data for documenting a function.
- name: String
The full Rust path of the function.
- options: Vec<DirectiveOption>
The directive options to use.
- content: Vec<String>
The docstring for the function.
Impls
- impl FunctionDirective
- const DIRECTIVE_NAME: &'static str
- fn from_item(parent_path: &str, item: &ItemFn, inherited_visibility: &Option<&Visibility>) -> Directive
Create a new
Directive::Functionfrom asyn::ItemFn.- Args:
- parent_path:
The full path of the module the function is in.
- item:
The
syn::ItemFnreference to parse.
- Returns:
A new
Directive::Functionvalue, which contains the parsedFunctionDirectivein it.
- fn from_impl_item(parent_path: &str, item: &ImplItemFn, inherited_visibility: &Option<&Visibility>) -> Directive
Create a new
Directive::Functionfrom asyn::ImplItemFn.- Args:
- parent_path:
The full path of the impl block the function is in.
- item:
The
syn::ImplItemFnreference to parse.
- Returns:
A new
Directive::Functionvalue, which contains the parsedFunctionDirectivein it.
- fn from_trait_item(parent_path: &str, item: &TraitItemFn, inherited_visibility: &Option<&Visibility>) -> Directive
Create a new
Directive::Functionfrom asyn::TraitItemFn.- Args:
- parent_path:
The full path of the trait the function is in.
- item:
The
syn::TraitItemFnreference to parse.
- Returns:
A new
Directive::Functionvalue, which contains the parsedFunctionDirectivein it.
- fn from_extern(parent_path: &str, item: &ForeignItemFn, inherited_visibility: &Option<&Visibility>) -> Directive