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>>>Expand description
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: PathBufExpand description
The directory where the blob will be written to.
cache: Rc<Cache>Implementations
impl JsonRenderer<'_>[src]
impl JsonRenderer<'_>[src]pub(super) fn convert_item(&self, item: Item) -> Option<Item>[src]
fn convert_span(&self, span: Span) -> Option<Span>[src]
fn convert_visibility(&self, v: Visibility) -> Visibility[src]
impl<'tcx> JsonRenderer<'tcx>[src]
impl<'tcx> JsonRenderer<'tcx>[src]Trait Implementations
impl<'tcx> Clone for JsonRenderer<'tcx>[src]
impl<'tcx> Clone for JsonRenderer<'tcx>[src]fn clone(&self) -> JsonRenderer<'tcx>[src]
fn clone(&self) -> JsonRenderer<'tcx>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx>[src]
impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx>[src]fn item(&mut self, item: Item) -> Result<(), Error>[src]
fn item(&mut self, item: Item) -> Result<(), Error>[src]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.
const RUN_ON_MODULE: bool[src]
const RUN_ON_MODULE: bool[src]Whether to call item recursivly for modules Read more
fn init(
krate: Crate,
options: RenderOptions,
cache: Cache,
tcx: TyCtxt<'tcx>
) -> Result<(Self, Crate), Error>[src]
fn init(
krate: Crate,
options: RenderOptions,
cache: Cache,
tcx: TyCtxt<'tcx>
) -> Result<(Self, Crate), Error>[src]Sets up any state required for the renderer. When this is called the cache has already been populated. Read more
fn make_child_renderer(&self) -> Self[src]
fn make_child_renderer(&self) -> Self[src]Make a new renderer to render a child of the item currently being rendered.
fn mod_item_in(&mut self, _item: &Item) -> Result<(), Error>[src]
fn mod_item_in(&mut self, _item: &Item) -> Result<(), Error>[src]Renders a module (should not handle recursing into children).
fn after_krate(&mut self) -> Result<(), Error>[src]
fn after_krate(&mut self) -> Result<(), Error>[src]Post processing hook for cleanup and dumping output to files.
fn cache(&self) -> &Cache[src]
fn mod_item_out(&mut self) -> Result<(), Error>[src]
fn mod_item_out(&mut self) -> Result<(), Error>[src]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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>, pub fn vzip(self) -> V
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]
fn with_const(self) -> ConstnessAnd<Self>[src]
fn without_const(self) -> ConstnessAnd<Self>[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,