HrefContext in rustdoc::html::highlight - Rust (original) (raw)
pub(crate) struct HrefContext<'a, 'tcx> {
pub(crate) context: &'a Context<'tcx>,
pub(crate) file_span: Span,
pub(crate) root_path: &'a str,
pub(crate) current_href: String,
}
Expand description
This type is needed in case we want to render links on items to allow to go to their definition.
This span contains the current file we’re going through.
This field is used to know “how far” from the top of the directory we are to link to either documentation pages or other source pages.
This field is used to calculate precise local URLs.
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: 56 bytes