mod impl_directive

module impl_directive

Implementation of the rust:impl directive

Functions

fn nodes_for_impl(item: &ItemImpl) -> Vec<Node>

Generate docutils nodes for the impl block’s signature.

Structs and Unions

struct ImplDirective

Struct to hold details for documenting an impl block.

name: String

The full Rust path to the impl block, used as the directive’s name.

self_ty: String

The declared self type of the impl block.

resolved_self_ty: String

The full path of the self type of the impl block.

trait_: Option<String>

The trait implemented in the impl block, if any.

resolved_trait: Option<String>

The full path of the trait implemented, if any.

options: Vec<DirectiveOption>

The options for the directive.

content: Vec<String>

The content for the directive.

items: Vec<Directive>

The directives nested under this directive.

Implementations

impl ImplDirective

Variables

const DIRECTIVE_NAME: &'static str

Functions

fn change_parent(&mut self, new_parent: &str)

Change the parent module of the impl and its items.

fn directive_visibility(&self) -> &DirectiveVisibility

Return the visibility of this directive.

fn for_item(&self, name: &str) -> bool
fn for_trait(&self, name: &str, parent_name: &str) -> bool
fn from_item(parent_path: &str, item: &ItemImpl, inherited_visibility: &Option<&Visibility>) -> Self
fn set_directive_visibility(&mut self, visibility: &DirectiveVisibility)

Traits implemented

impl RstDirective for ImplDirective

Functions

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

Functions

fn fence_size(&self) -> usize
fn get_md_text(self, fence_size: usize, max_visibility: &DirectiveVisibility) -> Vec<String>