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

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]

fn sess(&self) -> &'tcx Session[src]

fn get_trait_implementors(&mut self, id: DefId) -> Vec<Id>[src]

fn get_impls(&mut self, id: DefId) -> Vec<Id>[src]

fn get_trait_items(&mut self) -> Vec<(Id, Item)>[src]

Trait Implementations

impl<'tcx> Clone for JsonRenderer<'tcx>[src]

impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx>[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.

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> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithConstness for T[src]