mod function_directive

module function_directive

Implementation of the rust:function directive

Macros

macro func_from_item

DRY macro to parse the different item types.

Structs and Unions

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::Function from a syn::ItemFn.

Args:
parent_path:

The full path of the module the function is in.

item:

The syn::ItemFn reference to parse.

Returns:

A new Directive::Function value, which contains the parsed FunctionDirective in it.

fn from_impl_item (parent_path : & str , item : & ImplItemFn , inherited_visibility : & Option < & Visibility > ,) -> Directive

Create a new Directive::Function from a syn::ImplItemFn.

Args:
parent_path:

The full path of the impl block the function is in.

item:

The syn::ImplItemFn reference to parse.

Returns:

A new Directive::Function value, which contains the parsed FunctionDirective in it.

fn from_trait_item (parent_path : & str , item : & TraitItemFn , inherited_visibility : & Option < & Visibility > ,) -> Directive

Create a new Directive::Function from a syn::TraitItemFn.

Args:
parent_path:

The full path of the trait the function is in.

item:

The syn::TraitItemFn reference to parse.

Returns:

A new Directive::Function value, which contains the parsed FunctionDirective in it.

fn from_extern (parent_path : & str , item : & ForeignItemFn , inherited_visibility : & Option < & Visibility > ,) -> Directive
impl MdDirective for FunctionDirective
fn get_md_text (self , fence_size : usize , max_visibility : & DirectiveVisibility) -> Vec < String >
impl RstDirective for FunctionDirective
fn get_rst_text (self , level : usize , max_visibility : & DirectiveVisibility) -> Vec < String >