mod crate_directive

module crate_directive

Implementation of the rust:crate directive.

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.

items: Vec<Directive>

The items within the crate’s lib.rs file.

Impls

impl CrateDirective
const DIRECTIVE_NAME: &'static str
fn new(name: &str, ast: &File) -> CrateDirective

Create a new CrateDirective for the crate from the source file.

The generated documentation produces a rust:crate directive.

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>