ContextInfo in rustdoc::html::render::context - Rust (original) (raw)

pub(crate) struct ContextInfo {
    pub(super) render_redirect_pages: bool,
    pub(crate) include_sources: bool,
    pub(crate) is_inside_inlined_module: bool,
}

Expand description

This struct contains the information that needs to be reset between eachFormatRenderer::item call.

When we enter a new module, we set these values for the whole module but they might be updated in each child item (especially if it’s a module). So to prevent these changes to impact other items rendering in the same module, we need to reset them to the module’s set values.

A flag, which when true, will render pages which redirect to the real location of an item. This is used to allow external links to publicly reused items to redirect to the right location.

This flag indicates whether source links should be generated or not. If the source files are present in the html rendering, then this will betrue.

Field used during rendering, to know if we’re inside an inlined item.

§

§

§

§

§

§

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: 3 bytes