Skip to main content

Module sources

Module sources 

Source

Re-exportsΒ§

use std::cell::Cell; πŸ”’
use std::cell::RefCell; πŸ”’
use std::ffi::OsStr; πŸ”’
use std::path::Component; πŸ”’
use std::path::Path; πŸ”’
use std::path::PathBuf; πŸ”’
use std::fmt; πŸ”’
use std::fs; πŸ”’
use askama::Template; πŸ”’
use askama::Template; πŸ”’
use rustc_data_structures::fx::FxHashSet; πŸ”’
use rustc_data_structures::fx::FxIndexMap; πŸ”’
use rustc_hir::def_id::LOCAL_CRATE; πŸ”’
use rustc_middle::ty::TyCtxt; πŸ”’
use rustc_session::Session; πŸ”’
use rustc_span::FileName; πŸ”’
use rustc_span::RealFileName; πŸ”’
use rustc_span::RemapPathScopeComponents; πŸ”’
use tracing::info; πŸ”’
use super::render::Context; πŸ”’
use super::highlight; πŸ”’
use super::layout; πŸ”’
use crate::clean; πŸ”’
use crate::clean::utils::has_doc_flag; πŸ”’
use crate::docfs::PathError; πŸ”’
use crate::error::Error; πŸ”’
use crate::visit::DocVisitor; πŸ”’

StructsΒ§

LocalSourcesCollector πŸ”’
ScrapedInfo πŸ”’
ScrapedSource πŸ”’
Source πŸ”’
SourceCollector πŸ”’
Helper struct to render all source code to HTML pages

EnumsΒ§

SourceContext πŸ”’

FunctionsΒ§

clean_path πŸ”’
Takes a path to a source file and cleans the path to it. This canonicalizes things like β€œ..” to components which preserve the β€œtop down” hierarchy of a static HTML tree. Each component in the cleaned path will be passed as an argument to f. The very last component of the path (ie the file name) is ignored. If a .. is encountered, the parent closure will be called to allow the callee to handle it.
collect_local_sources πŸ”’
filename_real_and_local πŸ”’
print_src πŸ”’
Wrapper struct to render the source code of a file. This will do things like adding line numbers to the left-hand side.
render πŸ”’