Struct rustdoc::json::JsonRenderer [−][src]
pub(crate) struct JsonRenderer<'tcx> {
tcx: TyCtxt<'tcx>,
index: Rc<RefCell<FxHashMap<Id, Item>>>,
out_path: PathBuf,
cache: Rc<Cache>,
}
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>
Implementations
Trait Implementations
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.
Whether to call item
recursivly 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
impl<'tcx> !RefUnwindSafe for JsonRenderer<'tcx>
impl<'tcx> !Send for JsonRenderer<'tcx>
impl<'tcx> !Sync for JsonRenderer<'tcx>
impl<'tcx> Unpin for JsonRenderer<'tcx>
impl<'tcx> !UnwindSafe for JsonRenderer<'tcx>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
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: 48 bytes