[−][src]Trait rustdoc::formats::renderer::FormatRenderer
Allows for different backends to rustdoc to be used with the run_format() function. Each
backend renderer has hooks for initialization, documenting an item, entering and exiting a
module, and cleanup/finalizing output.
Required methods
pub(crate) fn init(
krate: Crate,
options: RenderOptions,
render_info: RenderInfo,
edition: Edition,
cache: &mut Cache
) -> Result<(Self, Crate), Error>[src]
krate: Crate,
options: RenderOptions,
render_info: RenderInfo,
edition: Edition,
cache: &mut Cache
) -> Result<(Self, Crate), Error>
Sets up any state required for the renderer. When this is called the cache has already been populated.
pub(crate) fn item(&mut self, item: Item, cache: &Cache) -> Result<(), Error>[src]
Renders a single non-module item. This means no recursive sub-item rendering is required.
pub(crate) fn mod_item_in(
&mut self,
item: &Item,
item_name: &str,
cache: &Cache
) -> Result<(), Error>[src]
&mut self,
item: &Item,
item_name: &str,
cache: &Cache
) -> Result<(), Error>
Renders a module (should not handle recursing into children).
pub(crate) fn mod_item_out(&mut self, item_name: &str) -> Result<(), Error>[src]
Runs after recursively rendering all sub-items of a module.
pub(crate) fn after_krate(
&mut self,
krate: &Crate,
cache: &Cache
) -> Result<(), Error>[src]
&mut self,
krate: &Crate,
cache: &Cache
) -> Result<(), Error>
Post processing hook for cleanup and dumping output to files.
pub(crate) fn after_run(&mut self, diag: &Handler) -> Result<(), Error>[src]
Called after everything else to write out errors.
Implementors
impl FormatRenderer for Context[src]
Generates the documentation for crate into the directory dst
pub(crate) fn init(
krate: Crate,
options: RenderOptions,
_render_info: RenderInfo,
edition: Edition,
cache: &mut Cache
) -> Result<(Context, Crate), Error>[src]
krate: Crate,
options: RenderOptions,
_render_info: RenderInfo,
edition: Edition,
cache: &mut Cache
) -> Result<(Context, Crate), Error>
pub(crate) fn after_run(&mut self, diag: &Handler) -> Result<(), Error>[src]
pub(crate) fn after_krate(
&mut self,
krate: &Crate,
cache: &Cache
) -> Result<(), Error>[src]
&mut self,
krate: &Crate,
cache: &Cache
) -> Result<(), Error>
pub(crate) fn mod_item_in(
&mut self,
item: &Item,
item_name: &str,
cache: &Cache
) -> Result<(), Error>[src]
&mut self,
item: &Item,
item_name: &str,
cache: &Cache
) -> Result<(), Error>
pub(crate) fn mod_item_out(&mut self, _item_name: &str) -> Result<(), Error>[src]
pub(crate) fn item(&mut self, item: Item, cache: &Cache) -> Result<(), Error>[src]
impl FormatRenderer for JsonRenderer[src]
pub(crate) fn init(
_krate: Crate,
_options: RenderOptions,
_render_info: RenderInfo,
_edition: Edition,
_cache: &mut Cache
) -> Result<(Self, Crate), Error>[src]
_krate: Crate,
_options: RenderOptions,
_render_info: RenderInfo,
_edition: Edition,
_cache: &mut Cache
) -> Result<(Self, Crate), Error>
pub(crate) fn item(&mut self, _item: Item, _cache: &Cache) -> Result<(), Error>[src]
pub(crate) fn mod_item_in(
&mut self,
_item: &Item,
_item_name: &str,
_cache: &Cache
) -> Result<(), Error>[src]
&mut self,
_item: &Item,
_item_name: &str,
_cache: &Cache
) -> Result<(), Error>
pub(crate) fn mod_item_out(&mut self, _item_name: &str) -> Result<(), Error>[src]
pub(crate) fn after_krate(
&mut self,
_krate: &Crate,
_cache: &Cache
) -> Result<(), Error>[src]
&mut self,
_krate: &Crate,
_cache: &Cache
) -> Result<(), Error>