mod crate_directive

module crate_directive

Implementation of the rust:crate:: directive.

Structs

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
fn new (crate_name : & str , ast : & File) -> CrateDirective

Create a new CrateDirective from the crate name and source file

Args:
crate_name:

The name of the crate.

ast:

Reference to syn::File struct from parsing the crate’s lib.rs file.

impl MdDirective for CrateDirective
fn get_md_text (self , fence_size : usize , max_visibility : & DirectiveVisibility) -> Vec < String >
fn fence_size (& self) -> usize
impl RstDirective for CrateDirective
fn get_rst_text (self , level : usize , max_visibility : & DirectiveVisibility) -> Vec < String >