Struct rustdoc::json::JsonRenderer

source ·
pub(crate) struct JsonRenderer<'tcx> {
    tcx: TyCtxt<'tcx>,
    index: Rc<RefCell<FxHashMap<Id, Item>>>,
    out_path: PathBuf,
    cache: Rc<Cache>,
    imported_items: FxHashSet<DefId>,
}

Fields

tcx: TyCtxt<'tcx>index: Rc<RefCell<FxHashMap<Id, Item>>>

A mapping of IDs that contains all local items for this crate which gets output as a top level field of the JSON blob.

out_path: PathBuf

The directory where the blob will be written to.

cache: Rc<Cache>imported_items: FxHashSet<DefId>

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Inserts an item into the index. This should be used rather than directly calling insert on the hashmap because certain items (traits and types) need to have their mappings for trait implementations filled out before they’re inserted.

Gives a description of the renderer. Used for performance profiling.
Whether to call item recursively for modules Read more
Sets up any state required for the renderer. When this is called the cache has already been populated. Read more
Make a new renderer to render a child of the item currently being rendered.
Renders a module (should not handle recursing into children).
Post processing hook for cleanup and dumping output to files.
Runs after recursively rendering all sub-items of a module.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 80 bytes